Reputation: 4009
I have seen the following code in a Nunit unit test
var controllerDescriptor = Substitute.For<HttpControllerDescriptor>();
What is the equivalent code using MS Test?
Upvotes: 2
Views: 689
Reputation: 247631
The code snippet is for NSubstitute mocking framework and has nothing to do with NUnit unit testing framework.
MS Test is also a testing framework and the shown code runs the same for Nunit or MS Test.
[TestClass]
public class MytestClass {
[TestMethod]
public void MyTest() {
var controllerDescriptor = Substitute.For<HttpControllerDescriptor>();
//...
}
}
Upvotes: 4