예제 #1
0
 /**
  * Test of validateXmlAgainstUserDefinedSchematronWhenURLIsValid method, of class
  * Capability3Tests.
  */
 @Test
 public void testValidateXmlAgainstUserDefinedSchematronWhenURLIsValid() throws Exception {
   LOGGER.info(
       "[TS] : Name of Test Case: testValidateXmlAgainstUserDefinedSchematronWhenURLIsValid\n"
           + "      [TS] : Description: Test for the ValidateXmlAgainstUserDefinedSchematron when URL valid, points at a Schematron and conforms to ISO 19139.\n"
           + "      [TS] : Expected Result: Xml validation =  PASS\n");
   Capability3Tests iut = new Capability3Tests();
   testContext.getSuite().setAttribute(SuiteAttribute.SCHEMA.getName(), "");
   // Map<String, String> params1=null;
   Map<String, String> params1 = testContext.getSuite().getXmlSuite().getParameters();
   params1.put(
       TestRunArg.IUT.toString(),
       "http://hydro10.sdsc.edu/metadata/ScienceBase_WAF_dump/0070D26B-28CD-4512-91BB-43BB0E573441.xml");
   params1.put(
       TestRunArg.SCH.toString(),
       this.getClass()
           .getResource(ETS_ROOT_PKG + "TestAssets/test-arg-valid-schematron-for-schematron.sch")
           .toString());
   testContext.getSuite().getXmlSuite().setParameters(null);
   iut.validateXmlAgainstUserDefinedSchematron(testContext);
 }
예제 #2
0
 @Test
 public void testValidateXmlAgainstUserDefinedSchematronWhenInputXMLIsValid() throws Exception {
   LOGGER.info(
       "[TS] : Name of Test Case: testValidateXmlAgainstUserDefinedSchematronWhenInputXMLIsValid\n"
           + "      [TS] : Description: Test for the ValidateXmlAgainstUserDefinedSchematron when input XML is valid, points at a Schematron and conforms to ISO 19139.\n"
           + "      [TS] : Expected Result: Xml validation =  PASS\n");
   Capability3Tests iut = new Capability3Tests();
   testContext.getSuite().setAttribute(SuiteAttribute.SCHEMA.getName(), "");
   // Map<String, String> params1=null;
   Map<String, String> params1 = testContext.getSuite().getXmlSuite().getParameters();
   params1.put(
       TestRunArg.IUT.toString(),
       this.getClass()
           .getResource(ETS_ROOT_PKG + "TestAssets/test-arg-validXMLFile.xml")
           .toString());
   params1.put(
       TestRunArg.SCH.toString(),
       this.getClass().getResource(ETS_ROOT_PKG + "TestAssets/test-arg-ISOStyle.sch").toString());
   testContext.getSuite().getXmlSuite().setParameters(null);
   iut.validateXmlAgainstUserDefinedSchematron(testContext);
 }