I have a unit test that is testing a creation service. The creation service is passed in a validation service in its constructor. The validation service returns an object that has a boolean property (IsValid). In my unit test I am mocking the validation service call to return an instance that has IsValid set to true. The creation service has an if statement that checks the value of that property. When I run the unit test, the object returned from the validation service has its property set to true, but when the if statement is executed, it treats it as though it was false.
Here is a link to the unit test itself -
https://gist.github.com/1076372
Here is a link to the creation service function I am testing -
https://gist.github.com/1076376
Does anyone know why the hell the IsValid property is true but is treated like it is false?