Beispiel #1
0
        public void ShouldFailUpperCaseAssertionOnLowerCaseCharAndPassOnUpperCaseChar()
        {
            var c = Any.AlphaChar();

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

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