public void GetMessageWithDefaultContextWillBeCorrect() { // Fixture setup var sut = new SomeClass(); // Exercise system var result = sut.GetMessage(); // Verify outcome Assert.Equal<string>("Default", result); // Teardown }
public void GetMessageWithReplacedContextWillReturnCorrectResult() { // Fixture setup SomeContext.Current = new MyContext(); var sut = new SomeClass(); // Exercise system var result = sut.GetMessage(); // Verify outcome Assert.Equal<string>("Ploeh", result); // Teardown }