示例#1
0
        public void Test_AreNotSame()
        {
            var a = new object();
            var b = new object();

            Assert.Throws <CustomException>(
                () => Require.AreNotSame <CustomException>(a, a)
                );
            Assert.Throws <ArgumentException>(
                () => Require.AreNotSame(a, a)
                );

            Assert.DoesNotThrow(
                () => Require.AreNotSame <CustomException>(a, b)
                );
            Assert.DoesNotThrow(
                () => Require.AreNotSame(a, b)
                );
        }