예제 #1
0
        public void No_match_if_string_does_not_contain_substring()
        {
            var matcher = Contains.String("bob");

            var matches = matcher.Matches("the cat sat on the mat");

            Assert.That(matches, Is.False());
        }
예제 #2
0
        public void Describe_to()
        {
            var matcher     = Contains.String("bob");
            var description = new StringDescription();

            matcher.DescribeTo(description);

            Assert.That(description.ToString(), Is.EqualTo("a string containing \"bob\""));
        }
예제 #3
0
        public void Describe_mismatch()
        {
            var matcher     = Contains.String("bob");
            var description = new StringDescription();

            matcher.DescribeMismatch("the cat sat on the mat", description);

            Assert.That(description.ToString(), Is.EqualTo("was \"the cat sat on the mat\""));
        }
예제 #4
0
 public ExceptionsPage FirstCellText(string text)
 {
     CheckThat(page.fistCell.Text, "Checking that first cell contains: ", Contains.String(text));
     return(page);
 }
예제 #5
0
 public void Match_if_string_contains_substring()
 {
     Assert.That("the cat sat on the mat", Contains.String("cat"));
 }
예제 #6
0
 public void Match_if_case_insensitive_string_contains_substring()
 {
     Assert.That("the Cat sat on the mat", Contains.String("cat").CaseInsensitive());
 }