Beispiel #1
0
        public virtual void testGetInValidAttributes()
        {
            JDFDoc    d  = new JDFDoc("DevCap");
            JDFDevCap dc = (JDFDevCap)d.getRoot();

            dc.setDevNS(null);
            Assert.AreEqual(0, dc.getInvalidAttributes(EnumValidationLevel.Complete, true, 0).Count);
            dc.setName("Foo");
            Assert.IsTrue(dc.getInvalidAttributes(EnumValidationLevel.RecursiveComplete, true, 0).Contains("DevNS"));
            Assert.IsTrue(dc.getInvalidAttributes(EnumValidationLevel.Complete, true, 0).Contains("DevNS"));
            dc.setName("FooLink");
            Assert.IsFalse(dc.getInvalidAttributes(EnumValidationLevel.Complete, true, 0).Contains("DevNS"));
            dc.setName("ScreeningParams");
            Assert.IsFalse(dc.getInvalidAttributes(EnumValidationLevel.Complete, true, 0).Contains("DevNS"));
            dc.setName("ScreeningParams_");
            Assert.IsTrue(dc.getInvalidAttributes(EnumValidationLevel.Complete, true, 0).Contains("DevNS"));
        }