public void NullSrIsValidForMapping() { Mock <VDI> vdi = ObjectManager.NewXenObject <VDI>(id); LunPerVdiPickerItem item = new LunPerVdiPickerItem(null, vdi.Object); Assert.That(item.IsValidForMapping, Is.False); }
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 bool IsValidForMapping(bool lunPerVDI) { Mock <SR> sr = ObjectManager.NewXenObject <SR>(id); sr.Setup(s => s.HBALunPerVDI()).Returns(lunPerVDI); Mock <VDI> vdi = ObjectManager.NewXenObject <VDI>(id); LunPerVdiPickerItem item = new LunPerVdiPickerItem(sr.Object, vdi.Object); return(item.IsValidForMapping); }
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()); }
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 NullEqualsReturnsFalse() { LunPerVdiPickerItem item = new LunPerVdiPickerItem(null, null); Assert.That(item.Equals(null), Is.False); }