Exemplo n.º 1
0
 public void DoTextMatch_CalledMultipleTimes_ViewContainsMatchesMessage()
 {
     var mainController = new MainController();
     mainController.DoTextMatch(_standardText, _matchingSubtext);
     mainController.DoTextMatch(_standardText, _matchingSubtext);
     var mainView = mainController.DoTextMatch(_standardText, _matchingSubtext);
     Assert.AreEqual(_expectedOutput, mainView.Matches);
 }
Exemplo n.º 2
0
 public void DoTextMatch_MatchesFound_ViewContainsMatchesMessage()
 {
     var mainView = new MainController().DoTextMatch(_standardText, _matchingSubtext);
     Assert.AreEqual(_expectedOutput, mainView.Matches);
 }
Exemplo n.º 3
0
 public void DoTextMatch_NoMatches_ViewContainsNoMatchesMessage()
 {
     var mainView = new MainController().DoTextMatch(_standardText, _nonMatchingSubtext);
     Assert.AreEqual(Controllers.Properties.Resources.noMatchesMessage, mainView.Matches);
 }
Exemplo n.º 4
0
 public void DoTextMatch_SubtextLongerThanText_ViewContainsSubtextTooLongMessage()
 {
     var mainView = new MainController().DoTextMatch(_standardText, _tooLongSubtext);
     Assert.AreEqual(Controllers.Properties.Resources.subtextTooLongMessage, mainView.Matches);
 }
Exemplo n.º 5
0
 public void DoTextMatch_SubtextEmpty_ViewContainsNoMatchesMessage()
 {
     var mainView = new MainController().DoTextMatch(_standardText, string.Empty);
     Assert.AreEqual(Controllers.Properties.Resources.textOrSubtextEmptyMessage, mainView.Matches);
 }