Пример #1
0
        public void testMaxOccurs()
        {
            JDFDevCap       dc  = deviceCap.appendDevCaps().appendDevCap();
            JDFIntegerState @is = dc.appendIntegerState();

            Assert.AreEqual(1, @is.getMaxOccurs());
            @is.setMaxOccurs(int.MaxValue);
            Assert.AreEqual(JDFConstants.POSINF, @is.getAttribute(AttributeName.MAXOCCURS, null, null));
            Assert.IsTrue(@is.getMaxOccurs() > 999);
            @is.setAttribute(AttributeName.MAXOCCURS, "unbounded");
            Assert.IsTrue(@is.getMaxOccurs() > 999, "correctly parsed unbounded for legacy support");
        }