c# - Mock a method for test - Stack Overflow
stackoverflow.com › questions › 36345282Apr 4, 2016 · For this reason, we mock the call and its return - in order to test the functionality of hello(string, int) without having to worry about its dependency's implementation. I have surrounded the above with actual class names to hopefully make it more obvious that we're mocking the class MyProgram and providing a new implementation (mock) of GetLastName()