- Home /
Configurations for Moq or another mock testing framework
A colleague and I spent the better part of the day trying to get any mock frameworks working in Unity, and we had no luck. First, here are our constraints:
Unity 3.5
MonoDevelop as shipped with Unity
All resources on the Asset Server
NUnit for unit testing
C#
We were able to configure Moq so that our tests passed in Monodevelop separately from Unity, but Unity fails to build due to a problem with the moq dll---specifically, a reflection failure. The best we can figure is that Mono just won't handle moq's reflection needs. We tinkered with Rhino Mocks 3.5 a bit but also had no luck.
So, has anyone been able to get any unit testing and mocking solutions working within the constraints we describe? I know we could make a separate project to contain our tests, but then we cannot have all of our code on the Asset Server.
Your answer
![](https://koobas.hobune.stream/wayback/20220613064648im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Run unit tests (nUnit) in debug mode (MonoDevelop) 0 Answers
How can I use nunit-console on OS X? 2 Answers
Debugging unit tests with Monodevelop 0 Answers
Next and previous button in NGUI 0 Answers
Unit testing for MonoBehaviours 2 Answers