예제 #1
0
 public void TextAndSubTextSameSize()
 {
     var input = new Input("Hello", "helLo");
     Assert.IsTrue(input.IsValid);
     CollectionAssert.IsEmpty(input.ErrorList);
 }
예제 #2
0
 public void TextIsSpacesOnly()
 {
     var input = new Input("  ", "h");
     Assert.IsTrue(input.IsValid);
     CollectionAssert.IsEmpty(input.ErrorList);
 }
예제 #3
0
 public void TextAndSubTextEmptySpaces()
 {
     var input = new Input("   ", " ");
     Assert.IsTrue(input.IsValid);
     CollectionAssert.IsEmpty(input.ErrorList);
 }
예제 #4
0
 public void SubTextShorterThanText_Success()
 {
     var input = new Input("cocacola", "coc");
     Assert.IsTrue(input.IsValid);
     Assert.IsEmpty(input.ErrorList);
 }
예제 #5
0
 public void SubTextLongerThanText_Failure()
 {
     var input = new Input("coca", "cocacola");
     Assert.IsFalse(input.IsValid);
     Assert.Contains(Errors.SubTextLongerThanText, input.ErrorList);
 }
예제 #6
0
 public void NullText()
 {
     var input = new Input(null, "hello");
     Assert.IsFalse(input.IsValid);
     Assert.Contains(Errors.EmptyText, input.ErrorList);
 }
예제 #7
0
 public void NullSubText()
 {
     var input = new Input("cocacola coca", null);
     Assert.IsFalse(input.IsValid);
     Assert.Contains(Errors.EmptySubText, input.ErrorList);
 }