示例#1
0
        public void AreSameShouldFailWithActualNullReference()
        {
            var assert = new AssertClass();

            assert.AreSame(new object(), null);

            Assert.AreEqual(TestOutcome.Failed, _args.Result.Outcome);
        }
示例#2
0
        public void AreSameShouldSucceedWithTwoNullReferences()
        {
            var assert = new AssertClass();

            assert.AreSame(null, null);

            Assert.AreEqual(TestOutcome.Succeeded, _args.Result.Outcome);
        }
示例#3
0
        public void AreSameShouldFailWithExpectedNullReference()
        {
            var assert = new AssertClass();

            assert.AreSame(null, GetComObject());

            Assert.AreEqual(TestOutcome.Failed, _args.Outcome);
        }
示例#4
0
        public void AreSameShouldFailWithDifferentReferences()
        {
            var assert = new AssertClass();
            var obj1   = new object();
            var obj2   = new object();

            assert.AreSame(obj1, obj2);

            Assert.AreEqual(TestOutcome.Failed, _args.Result.Outcome);
        }
示例#5
0
        public void AreSameShouldSucceedWithSameReferences()
        {
            var assert = new AssertClass();
            var obj1   = new object();
            var obj2   = obj1;

            assert.AreSame(obj1, obj2);

            Assert.AreEqual(TestOutcome.Succeeded, _args.Result.Outcome);
        }