package textbender.a.b.rhinohideDemo._.core; import org.junit.*; import org.w3c.dom.*; import textbender.a.b.rhinohideDemo._.*; import static org.junit.Assert.*; /** Test of Core Level 1 (isolate). */ public final class RhiElement_1i { private Document document; // private Element element; @Before public void before() { document = Core_1i_Test.window().getDocument(); // element = Core_1_Demo.getElementById( document, "testBlockNode" ); } // ------------------------------------------------------------------------------------ @Test public void normalize() { final String stringA = "[normalize A]"; final String stringB = "[normalize B]"; Element span = document.createElement( "span" ); span.appendChild( document.createTextNode( stringA )); span.appendChild( document.createTextNode( stringB )); span.normalize(); Text text = (Text)span.getFirstChild(); assertEquals( /*expected*/stringA + stringB, /*actual*/text.getData() ); } }