示例#1
0
        public virtual void testValidateZip()
        {
            FileInfo     zip     = new FileInfo(sm_dirTestData + "checkjdf.zip");
            JDFValidator checker = new JDFValidator();
            XMLDoc       d       = checker.processZipFile(zip);
            KElement     root    = d.getRoot();

            Assert.AreEqual(17, root.numChildElements("TestFile", null), "checkJDF.zip has 17 files");
        }
示例#2
0
        public virtual void testValidateMime()
        {
            FileInfo     mim     = new FileInfo(sm_dirTestData + "checkjdf.mjm");
            JDFValidator checker = new JDFValidator();
            FileStream   @is     = new FileStream(mim.FullName, FileMode.Open);
            XMLDoc       d       = checker.ProcessMimeStream(@is);
            KElement     root    = d.getRoot();

            Assert.AreEqual(2, root.numChildElements("TestFile", null), "checkJDF.mjm has 2 files");
        }