示例#1
0
        public void AssertDoesNotThrowInReleaseBuilds()
        {
            if (isDebugBuild)
            {
                NUnitAssert.Ignore("This test is only for release build mode.");
            }

            NUnitAssert.DoesNotThrow(() => {
                CometPeakAssert.IsTrue(false, "This should NOT be thrown in release builds!");
            });
        }
示例#2
0
        public void AssertThrowsInDebugBuilds()
        {
            if (!isDebugBuild)
            {
                NUnitAssert.Ignore("This test is only for debug build mode.");
            }

            NUnitAssert.Throws <AssertionException>(() => {
                CometPeakAssert.IsTrue(false, "This should be an assertion exception!");
            });
        }