Example #1
0
 public void Display_ReturnEmptyString()
 {
     // special class we create View Mock, so we can mock View
     var view = new ViewMock(null);
     var result = view.Display();
     Assert.AreEqual("", result);
 }
Example #2
0
 public void Display_ReturnStringResult()
 {
     // special class we create View Mock, so we can mock View
     var view = new ViewMock(5);
     var result = view.Display();
     Assert.IsInstanceOfType(result, typeof(string));
 }
Example #3
0
 public void Display_ReturnsCorrectResult()
 {
     // special class we create View Mock, so we can mock View
     var view = new ViewMock("Test");
     var result = view.Display();
     Assert.AreEqual("Test", result);
 }
Example #4
0
 public void Display_ReturnsCorrectResultTrimmed()
 {
     var view = new ViewMock(" Test ");
     var result = view.Display();
     Assert.AreEqual("Test", result);
 }