예제 #1
0
        public void Test_AreSame()
        {
            var a = new object();
            var b = new object();

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

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