Example #1
0
        public void IsMatch_SuffixAndNotMatches_False()
        {
            // Arrange
            var target = new StringMatchRule("Name", StringMatchType.Suffix);

            // Act
            var result = target.IsMatch("Name ");

            // Assert
            Assert.IsFalse(result);
        }
Example #2
0
        public void IsMatch_ExactAndMatches_True()
        {
            // Arrange
            var target = new StringMatchRule("Name", StringMatchType.Exact);

            // Act
            var result = target.IsMatch("Name");

            // Assert
            Assert.IsTrue(result);
        }
Example #3
0
        public void IsMatch_SuffixAndMatches_True()
        {
            // Arrange
            var target = new StringMatchRule("Sam", StringMatchType.Suffix);

            // Act
            var result = target.IsMatch("SonOfSam");

            // Assert
            Assert.IsTrue(result);
        }