Ejemplo n.º 1
0
        public void No_match_if_string_does_not_end_with_substring()
        {
            var matcher = Ends.With("bob");

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

            Assert.That(matches, Is.False());
        }
Ejemplo n.º 2
0
        public void Describe_to()
        {
            var matcher     = Ends.With("bob");
            var description = new StringDescription();

            matcher.DescribeTo(description);

            Assert.That(description.ToString(), Is.EqualTo("a string ending with \"bob\""));
        }
Ejemplo n.º 3
0
        public void Describe_mismatch()
        {
            var matcher     = Ends.With("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\""));
        }
Ejemplo n.º 4
0
 public void Match_if_string_ends_with_substring()
 {
     Assert.That("the cat sat on the mat", Ends.With("mat"));
 }
Ejemplo n.º 5
0
 public void Case_insensitive_match_if_string_ends_with_substring()
 {
     Assert.That("the cat sat on the mat", Ends.With("Mat").CaseInsensitive());
 }