Mid Testing

Can you mock methods with parameters? How?

mockService.Setup(s => s.GetData(It.IsAny<int>())).Returns("Data");

You can specify argument matchers like It.IsAny<T>() to mock methods with

parameters.

More from C# Programming Tutorial

All questions for this course