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

            Assert.IsNull(@is.getAttribute(AttributeName.MAXOCCURS, null, null));
            @is.fixVersion(null);
            Assert.IsNull(@is.getAttribute(AttributeName.MAXOCCURS, null, null));
            @is.setAttribute(AttributeName.MAXOCCURS, "unbounded");
            @is.fixVersion(null);
            Assert.AreEqual(JDFConstants.POSINF, @is.getAttribute(AttributeName.MAXOCCURS));
            @is.setAttribute(AttributeName.MAXOCCURS, "3");
            @is.fixVersion(null);
            Assert.AreEqual("3", @is.getAttribute(AttributeName.MAXOCCURS));
        }