public virtual void testIsPresentPartition() { JDFAction act = devicecap.appendActionPool().appendActionTest(EnumTerm.IsPresentEvaluation, true); JDFTest tst = act.getTest(); tst.setContext("//Component"); JDFIsPresentEvaluation ipe = (JDFIsPresentEvaluation)tst.getTerm(); ipe.setRefTarget(ptState); Assert.AreEqual(ptState.getID(), ipe.getrRef()); JDFDoc doc = new JDFDoc("JDF"); JDFNode node = doc.getJDFRoot(); node.setType("fnarf", false); JDFComponent comp = (JDFComponent)node.addResource("Component", null, EnumUsage.Input, null, null, null, null); comp.setProductType("Cover"); XMLDoc rep = new XMLDoc("root", null); KElement eRep = rep.getRoot(); bool fitsJDF = tst.fitsJDF(comp, eRep); Assert.IsTrue(fitsJDF); comp = (JDFComponent)comp.addPartition(EnumPartIDKey.SheetName, "s1"); fitsJDF = tst.fitsJDF(comp, eRep); Assert.IsTrue(fitsJDF, "also partition leaves "); }
public virtual void testAction() { JDFDoc d = new JDFDoc(ElementName.DEVICECAP); JDFDeviceCap dc = (JDFDeviceCap)d.getRoot(); JDFTestPool tp = dc.appendTestPool(); JDFTest test = tp.appendTest(); JDFActionPool ap = dc.appendActionPool(); JDFAction a = ap.appendAction(); a.setTest(test); Assert.AreEqual(test, a.getTest()); Assert.IsTrue(a.hasAttribute("TestRef")); }
public virtual void testLogic() { JDFDoc d = new JDFDoc(ElementName.DEVICECAP); JDFDeviceCap dc = (JDFDeviceCap)d.getRoot(); dc.appendDevCapPool(); JDFTestPool tp = dc.appendTestPool(); JDFTest test = tp.appendTest(); test.appendTerm(EnumTerm.and); JDFActionPool ap = dc.appendActionPool(); JDFAction a = ap.appendAction(); a.setTest(test); // TODO more }