Beispiel #1
0
 public void IsInRangeReturnFalse()
 {
     Json.Range range = new Json.Range('a', 'f');
     Assert.True(range.Match("bcd").Success());
 }
Beispiel #2
0
 public void IsNotInRangeReturnFalse()
 {
     Json.Range range = new Json.Range('a', 'f');
     Assert.False(range.Match("1ab").Success());
 }
Beispiel #3
0
 public void NullTextReturnFalse()
 {
     Json.Range range = new Json.Range('a', 'f');
     Assert.False(range.Match(null).Success());
 }
Beispiel #4
0
 public void EmptyTextReturnFalse()
 {
     Json.Range range = new Json.Range('a', 'f');
     Assert.False(range.Match("").Success());
 }
        public void CheckIfRangeWorks1ShouldReturnTrue()
        {
            Range range = new Range('a', 'i');

            Assert.True(range.Match("hellicopter").Success());
        }
        public void CheckIfRemainingTextIsCorrectWhenSuccessIsFalse()
        {
            Range range = new Range('b', 'g');

            Assert.Equal("alfabet", range.Match("alfabet").RemainingText());
        }
        public void CheckIfRangeWorksWhenTextIsEmptyShouldReturnFalse()
        {
            Range range = new Range('a', 'f');

            Assert.False(range.Match("").Success());
        }
        public void CheckIfRanceWorksWhenTextIsNullShouldReturnFalse()
        {
            Range range = new Range('a', 'g');

            Assert.False(range.Match(null).Success());
        }
        public void CheckIfRangeWorks2ShouldReturnFalse()
        {
            Range range = new Range('a', 'g');

            Assert.False(range.Match("xulescu").Success());
        }