Exemplo n.º 1
0
 public void GetMessageWithDefaultContextWillBeCorrect()
 {
     // Fixture setup
     var sut = new SomeClass();
     // Exercise system
     var result = sut.GetMessage();
     // Verify outcome
     Assert.Equal<string>("Default", result);
     // Teardown
 }
Exemplo n.º 2
0
 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
 }