Пример #1
0
        public void ContainsConstraintApplyTo()
        {
            var containsConstraint = new ContainsConstraint(6);
            var collection1        = new[] { 1, 2, 3, 4, 5, 6, 7, 8 };
            var result             = containsConstraint.ApplyTo(collection1);

            Assert.That(result.IsSuccess, Is.True);
        }
Пример #2
0
        public void HonorsIgnoreCaseForString()
        {
            var actualString = "ABCdef";
            var constraint   = new ContainsConstraint("abc").IgnoreCase;

            var result = constraint.ApplyTo(actualString);

            Assert.That(result.IsSuccess);
        }
Пример #3
0
        public void HonorsIgnoreCaseForStringCollection()
        {
            var actualItems = new[] { "ABC", "def" };
            var constraint  = new ContainsConstraint("abc").IgnoreCase;

            var result = constraint.ApplyTo(actualItems);

            Assert.That(result.IsSuccess);
        }