コード例 #1
0
        public void IsFalseTest()
        {
            string message = string.Empty;

            try
            {
                ArgumentAssert.IsFalse(false, message);
            }
            catch
            {
                Assert.Fail("Assert method must throw no exceptions");
            }

            try
            {
                ArgumentAssert.IsFalse(true, message);
                Assert.Fail("Assert method must throw ArgumentException exception");
            }
            catch (ArgumentException)
            {
                // test passed
            }
        }