/** * Test method for {@link * net.hyperadapt.pxweave.interpreter.test.OperationInterpreter#interpreteReduceContent(org.w3c.dom.NodeList, * java.lang.String)} . * * @throws XMLWeaverException */ @Test public void testInterpreteReduceContent() throws XMLWeaverException { final NodeList joinPoints = xPathEvaluator.evaluateXPath("//books:book/books:publisher", document); oInterpreter.interpreteReduceContent(joinPoints, "Media"); assertTrue("", joinPoints.item(0).getFirstChild().getNodeValue().contentEquals("VVM")); oInterpreter.interpreteReduceContent(joinPoints, ""); assertTrue("no textNode should be left", joinPoints.item(0).getChildNodes().getLength() == 0); oInterpreter.interpreteReduceContent(joinPoints, null); assertTrue("no textNode should be left", joinPoints.item(0).getChildNodes().getLength() == 0); }