Exemple #1
0
        public void ShouldFailLowerCaseAssertionOnUpperCaseCharAndPassOnLowerCaseChar()
        {
            var c = Any.AlphaChar();

            Assert.Throws <AssertionException>(() => XAssert.IsLowerCase(char.ToUpper(c)));
            Assert.DoesNotThrow(() => XAssert.IsLowerCase(char.ToLower(c)));
        }
Exemple #2
0
        public void ShouldFailLowerCaseAssertionOnUpperCaseStringAndPassOnLowerCaseString()
        {
            var s = Any.String();

            Assert.Throws <AssertionException>(() => XAssert.IsLowerCase(s.ToUpper()));
            Assert.DoesNotThrow(() => XAssert.IsLowerCase(s.ToLower()));
        }