Last active
April 16, 2020 02:17
-
-
Save cyberhck/e4771dea09a8ec5f0b4349f9f6896618 to your computer and use it in GitHub Desktop.
part of medium class, look at https://gist.github.com/cyberhck/e142b7b94fd939691f67a6d3342094b1 for all classes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Tests | |
{ | |
public class BadClassTest | |
{ | |
[Test] | |
public void TestGreetDoesNotThrowException() | |
{ | |
var unit = new BadClass(); | |
// var mock = new Mock<IService>(); (setup as well) | |
// use reflection to change the implementation under the hood, (unit._service = mock) | |
Assert.DoesNotThrow(() => unit.Greet()) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment