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); }
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.VerifyGet(v=>v.Name); }
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); }
public void NullEqualsReturnsFalse() { LunPerVdiPickerItem item = new LunPerVdiPickerItem(null, null); Assert.That(item.Equals(null), Is.False); }