Exemplo n.º 1
0
        public void WhenReferencesAreOfDifferentType_ThenEqualsReturnsFalse()
        {
            var ref1 = new VmInstanceReference("proj", "zone", "inst");
            var ref2 = new ZonalResourceReference("proj", "zone", "instances", "inst");

            Assert.IsFalse(ref2.Equals(ref1));
            Assert.IsFalse(ref2.Equals((object)ref1));
            Assert.IsFalse(ref1.Equals(ref2));
            Assert.IsFalse(ref1.Equals((object)ref2));
        }
Exemplo n.º 2
0
        public void TestNotEquals()
        {
            var ref1 = new VmInstanceReference("proj", "zone", "inst");
            var ref2 = new VmInstanceReference("proj", "zone", "other");

            Assert.IsFalse(ref1.Equals(ref2));
            Assert.IsFalse(ref1.Equals((object)ref2));
            Assert.IsFalse(ref1 == ref2);
            Assert.IsTrue(ref1 != ref2);
        }
Exemplo n.º 3
0
        public void WhenReferencesAreNotEquivalent_ThenEqualsReturnsFalse()
        {
            var ref1 = new VmInstanceReference("proj", "zone", "inst");
            var ref2 = new VmInstanceReference("proj", "zone", "other");

            Assert.IsFalse(ref1.Equals(ref2));
            Assert.IsFalse(ref1.Equals((object)ref2));
            Assert.IsFalse(ref1 == ref2);
            Assert.IsTrue(ref1 != ref2);
        }
Exemplo n.º 4
0
        public void TestEqualsNull()
        {
            var ref1 = new VmInstanceReference("proj", "zone", "inst");

            Assert.IsFalse(ref1.Equals(null));
            Assert.IsFalse(ref1.Equals((object)null));
            Assert.IsFalse(ref1 == null);
            Assert.IsFalse(null == ref1);
            Assert.IsTrue(ref1 != null);
            Assert.IsTrue(null != ref1);
        }