Exemple #1
0
        public void NullVdiInBaseObjectEquals()
        {
            LunPerVdiPickerItem nullItem = new LunPerVdiPickerItem(null, null);
            Mock <VDI>          vdiA     = ObjectManager.NewXenObject <VDI>(id);
            LunPerVdiPickerItem item     = new LunPerVdiPickerItem(null, vdiA.Object);

            Assert.That(nullItem.Equals(item), Is.False);
        }
Exemple #2
0
        public void NullVdiInComparisonObjectEquals()
        {
            LunPerVdiPickerItem nullItem = new LunPerVdiPickerItem(null, null);
            Mock <VDI>          vdi      = ObjectManager.NewXenObject <VDI>(id);

            vdi.Setup(v => v.Name()).Returns("NAME");
            LunPerVdiPickerItem item = new LunPerVdiPickerItem(null, vdi.Object);

            Assert.That(item.Equals(nullItem), Is.False);
            vdi.Verify(v => v.Name());
        }
Exemple #3
0
        public void VdiBaseEqualsIsCalled()
        {
            Mock <VDI> vdiA = ObjectManager.NewXenObject <VDI>(id);

            vdiA.Object.opaque_ref = "OREF1";
            LunPerVdiPickerItem itemA = new LunPerVdiPickerItem(null, vdiA.Object);

            Mock <VDI> vdiB = ObjectManager.NewXenObject <VDI>(id);

            vdiB.Object.opaque_ref = "OREF2";
            LunPerVdiPickerItem itemB = new LunPerVdiPickerItem(null, vdiB.Object);

            Assert.That(itemB.Equals(itemA), Is.False);
        }
Exemple #4
0
        public void NullEqualsReturnsFalse()
        {
            LunPerVdiPickerItem item = new LunPerVdiPickerItem(null, null);

            Assert.That(item.Equals(null), Is.False);
        }