This is for using Moq when the method you are unit testing has an output of a particular type (as opposed to a boolean or string).
This code is really rough (the statement in green is the most important statement and does work)
[Test Method]
public void MyTest()
{
....Setup stuff
myType result = CallSomeMethod();
Assert.IsTrue(result.GetType() == typeof(myType));
}

No comments:
Post a Comment
Note: Only a member of this blog may post a comment.