Esempio n. 1
0
        public void IsNotMatch()
        {
            Assert.ThrowsExact <ArgumentNullException>(() => Assert.IsNotMatch(null as Regex, string.Empty));
            Assert.ThrowsExact <ArgumentNullException>(() => Assert.IsNotMatch(new Regex(string.Empty), null));

            Assert.DoesNotThrow(() => Assert.IsNotMatch("abc", "cba"));
            Assert.DoesNotThrow(() => Assert.IsNotMatch(new Regex("abc"), "cba"));
            Assert.ThrowsExact <AssertionException>(() => Assert.IsNotMatch("abc", "abc"));
            Assert.ThrowsExact <AssertionException>(() => Assert.IsNotMatch(new Regex("abc"), "abc"));
        }