public virtual void testGetAvailability() { JDFDoc d = new JDFDoc("DevCap"); JDFDevCap dc = (JDFDevCap)d.getRoot(); dc.setAvailability(EnumAvailability.NotInstalled); Assert.AreEqual(EnumAvailability.NotInstalled, dc.getAvailability()); Assert.AreEqual(EnumAvailability.NotInstalled, dc.getModuleAvailability()); }
public void testGetAvailability() { JDFDevCap dc = deviceCap.appendDevCaps().appendDevCap(); JDFIntegerState @is = dc.appendIntegerState(); Assert.AreEqual(EnumAvailability.Installed, dc.getAvailability()); Assert.AreEqual(EnumAvailability.Installed, @is.getAvailability()); dc.setAvailability(EnumAvailability.NotLicensed); Assert.AreEqual(EnumAvailability.NotLicensed, dc.getAvailability()); Assert.AreEqual(EnumAvailability.NotLicensed, @is.getAvailability()); }
public virtual void testGetModuleAvailability() { JDFDoc d = new JDFDoc("DeviceCap"); JDFDeviceCap deviceCap = (JDFDeviceCap)d.getRoot(); JDFModuleCap mc = deviceCap.appendModulePool().appendModuleCap(); mc.setID("i"); mc.setAvailability(EnumAvailability.NotLicensed); JDFDevCap dc = deviceCap.appendDevCaps().appendDevCap(); Assert.AreEqual(EnumAvailability.Installed, dc.getModuleAvailability()); dc.setAvailability(EnumAvailability.Module); Assert.AreEqual(EnumAvailability.Module, dc.getAvailability()); Assert.IsNull(dc.getModuleAvailability()); dc.setModuleRefs(new VString("i", null)); Assert.AreEqual(EnumAvailability.NotLicensed, dc.getModuleAvailability()); }
public virtual void testAppendModuleRef() { JDFDoc d = new JDFDoc("DeviceCap"); JDFDeviceCap deviceCap = (JDFDeviceCap)d.getRoot(); JDFDevCap dc = deviceCap.appendDevCaps().appendDevCap(); dc.setAvailability(EnumAvailability.NotInstalled); Assert.AreEqual(EnumAvailability.NotInstalled, dc.getAvailability()); Assert.AreEqual(EnumAvailability.NotInstalled, dc.getModuleAvailability()); JDFModuleCap mc = dc.appendModuleRef("MyDev"); mc.setAvailability(EnumAvailability.Disabled); Assert.AreEqual(EnumAvailability.Module, dc.getAvailability()); Assert.AreEqual(EnumAvailability.Disabled, dc.getModuleAvailability()); Assert.AreEqual(EnumAvailability.Disabled, mc.getAvailability()); mc = dc.appendModuleRef("MyOtherDev"); mc.setAvailability(EnumAvailability.NotInstalled); Assert.AreEqual(EnumAvailability.NotInstalled, dc.getModuleAvailability()); Assert.AreEqual(EnumAvailability.NotInstalled, mc.getAvailability()); }