1 package org.kuali.ole.ingest;
2
3 import org.apache.commons.io.IOUtils;
4 import org.apache.log4j.Logger;
5 import org.junit.Test;
6
7 import java.io.ByteArrayInputStream;
8
9 import static junit.framework.Assert.assertTrue;
10
11
12
13
14
15
16
17
18 public class KrmsXMLSchemaValidation_UT {
19
20 private static final Logger LOG = Logger.getLogger(KrmsXMLSchemaValidation_UT.class);
21 private static final String Krms_XML_FILE = "license.xml";
22
23 @Test
24 public void testProfileXMLSchemaValidation() throws Exception {
25 byte[] profileByteArray;
26 profileByteArray = IOUtils.toByteArray(getClass().getResourceAsStream(Krms_XML_FILE));
27 ByteArrayInputStream profileSchemaByteArray = new ByteArrayInputStream(profileByteArray);
28 KrmsXMLSchemaValidator krmsXMLSchemaValidator = new KrmsXMLSchemaValidator();
29 boolean schemaFlag=krmsXMLSchemaValidator.validateContentsAgainstSchema(profileSchemaByteArray);
30 assertTrue(schemaFlag);
31 }
32 }