예제 #1
0
        public virtual void testSetTolerance()
        {
            JDFDoc d = new JDFDoc(ElementName.XYPAIREVALUATION);
            JDFXYPairEvaluation ie = (JDFXYPairEvaluation)d.getRoot();

            ie.setTolerance(new JDFXYPair(1, 1));
            Assert.AreEqual("1 1", ie.getTolerance().ToString());
            ie.setValueList(new JDFXYPair(1.5, 1.5));
            ie.appendBasicPreflightTest("foo");
            Assert.IsTrue(ie.fitsMap(new JDFAttributeMap("foo", "1.2 1.6")));
        }
예제 #2
0
        public void testFitsTolerance()
        {
            try
            {
                new JDFXYPairRangeList("0.4 1.9~1.4 2.9 0.4 1.9~2.4 3.8 0.4 1.6");

                JDFDoc  d = new JDFDoc(ElementName.TEST);
                JDFTest t = (JDFTest)d.getRoot();
                t.init();
                JDFXYPairEvaluation xyPairEvaluation = (JDFXYPairEvaluation)t.appendTerm(EnumTerm.XYPairEvaluation);
                xyPairEvaluation.setTolerance(new JDFXYPair("0 0"));
                Assert.IsTrue(t.isValid(EnumValidationLevel.Complete));

                Assert.AreEqual(new JDFXYPair("0 0"), xyPairEvaluation.getTolerance());
                xyPairEvaluation.setTolerance(new JDFXYPair("0.1 0.1"));
            }
            catch (FormatException dfe)
            {
                Assert.Fail(dfe.ToString());
            }
        }