Search in sources :

Example 1 with CDataSect

use of org.whole.lang.xml.model.CDataSect in project whole by wholeplatform.

the class NormalizerOperationTest method testXmlBehavior.

@Test
public void testXmlBehavior() {
    assertTrue(ReflectionFactory.getLanguageKit(XmlLanguageKit.URI).hasVisitor(NormalizerOperation.ID));
    XmlEntityFactory ef = XmlEntityFactory.instance;
    CDataSect data = ef.createCDataSect(ef.createCDataSectData("one"), ef.createCDataSectData("two"), ef.createCDataSectData("three"));
    CDataSect dataOrig = EntityUtils.clone(data);
    NormalizerOperation.normalize(data);
    assertFalse(Matcher.match(dataOrig, data));
    CDataSect dataOrig2 = EntityUtils.clone(data);
    NormalizerOperation.normalize(data);
    assertTrue(Matcher.match(dataOrig2, data));
}
Also used : CDataSect(org.whole.lang.xml.model.CDataSect) XmlEntityFactory(org.whole.lang.xml.factories.XmlEntityFactory) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 XmlEntityFactory (org.whole.lang.xml.factories.XmlEntityFactory)1 CDataSect (org.whole.lang.xml.model.CDataSect)1