Exemplo n.º 1
0
        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());
        }
Exemplo n.º 2
0
        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());
        }
Exemplo n.º 3
0
        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());
        }
Exemplo n.º 4
0
        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());
        }