Search in sources :

Example 1 with StringsubsDefinition

use of com.sun.enterprise.admin.servermgmt.xml.stringsubs.StringsubsDefinition in project Payara by payara.

the class TestStringSubstitutionEngine method testXMLLoading.

/**
 * Test the loaded string-subs.xml object.
 */
@Test
public void testXMLLoading() {
    StringsubsDefinition def = _engine.getStringSubsDefinition();
    Assert.assertNotNull(def);
    Assert.assertNotNull(def.getComponent());
    Assert.assertEquals(def.getComponent().size(), 2);
    Assert.assertNotNull(def.getVersion());
    Assert.assertFalse(def.getChangePair().isEmpty());
}
Also used : StringsubsDefinition(com.sun.enterprise.admin.servermgmt.xml.stringsubs.StringsubsDefinition) Test(org.testng.annotations.Test) AfterTest(org.testng.annotations.AfterTest)

Example 2 with StringsubsDefinition

use of com.sun.enterprise.admin.servermgmt.xml.stringsubs.StringsubsDefinition in project Payara by payara.

the class TestStringSubstitutionParser method testParser.

/**
 * Test string subs XML parsing.
 */
@Test
public void testParser() {
    StringsubsDefinition def = null;
    try {
        def = StringSubstitutionParser.parse(_configStream);
    } catch (StringSubstitutionException e) {
        Assert.fail("Failed to parse xml : " + _stringSubsPath, e);
    }
    Assert.assertNotNull(def);
    Assert.assertNotNull(def.getComponent());
    Assert.assertNotNull(def.getVersion());
    Assert.assertFalse(def.getChangePair().isEmpty());
}
Also used : StringSubstitutionException(com.sun.enterprise.admin.servermgmt.stringsubs.StringSubstitutionException) StringsubsDefinition(com.sun.enterprise.admin.servermgmt.xml.stringsubs.StringsubsDefinition) Test(org.testng.annotations.Test)

Aggregations

StringsubsDefinition (com.sun.enterprise.admin.servermgmt.xml.stringsubs.StringsubsDefinition)2 Test (org.testng.annotations.Test)2 StringSubstitutionException (com.sun.enterprise.admin.servermgmt.stringsubs.StringSubstitutionException)1 AfterTest (org.testng.annotations.AfterTest)1