本文整理匯總了Java中org.custommonkey.xmlunit.XMLUnit.setNormalizeWhitespace方法的典型用法代碼示例。如果您正苦於以下問題:Java XMLUnit.setNormalizeWhitespace方法的具體用法?Java XMLUnit.setNormalizeWhitespace怎麽用?Java XMLUnit.setNormalizeWhitespace使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.custommonkey.xmlunit.XMLUnit
的用法示例。
在下文中一共展示了XMLUnit.setNormalizeWhitespace方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: testConfigurationMerging
import org.custommonkey.xmlunit.XMLUnit; //導入方法依賴的package包/類
public void testConfigurationMerging()
throws Exception
{
XMLUnit.setNormalizeWhitespace( true );
InputStream resourceAsStream = getClass().getResourceAsStream( "/components-1.xml" );
transformer.processResource( "components-1.xml", resourceAsStream,
Collections.<Relocator> emptyList() );
resourceAsStream.close();
InputStream resourceAsStream1 = getClass().getResourceAsStream( "/components-2.xml" );
transformer.processResource( "components-1.xml", resourceAsStream1,
Collections.<Relocator> emptyList() );
resourceAsStream1.close();
final InputStream resourceAsStream2 = getClass().getResourceAsStream( "/components-expected.xml" );
Diff diff = XMLUnit.compareXML(
IOUtil.toString( resourceAsStream2, "UTF-8" ),
IOUtil.toString( transformer.getTransformedResource(), "UTF-8" ) );
//assertEquals( IOUtil.toString( getClass().getResourceAsStream( "/components-expected.xml" ), "UTF-8" ),
// IOUtil.toString( transformer.getTransformedResource(), "UTF-8" ).replaceAll("\r\n", "\n") );
resourceAsStream2.close();
XMLAssert.assertXMLIdentical( diff, true );
}
開發者ID:javiersigler,項目名稱:apache-maven-shade-plugin,代碼行數:24,代碼來源:ComponentsXmlResourceTransformerTest.java
示例2: initialise
import org.custommonkey.xmlunit.XMLUnit; //導入方法依賴的package包/類
@Before
public void initialise() {
System.setProperty("javax.xml.parsers.DocumentBuilderFactory",
"org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
System.setProperty("javax.xml.parsers.SAXParserFactory",
"org.apache.xerces.jaxp.SAXParserFactoryImpl");
System.setProperty("javax.xml.transform.TransformerFactory",
"org.apache.xalan.processor.TransformerFactoryImpl");
XMLUnit.setIgnoreComments(true);
XMLUnit.setNormalizeWhitespace(true);
}
示例3: setUp
import org.custommonkey.xmlunit.XMLUnit; //導入方法依賴的package包/類
@Before
public void setUp() throws Exception {
base.port(port);
XMLUnit.setIgnoreWhitespace(true);
XMLUnit.setNormalizeWhitespace(true);
createTestUser();
// createGroup();
}
示例4: tearDown
import org.custommonkey.xmlunit.XMLUnit; //導入方法依賴的package包/類
@After
public void tearDown() {
assertTrue(externalConnections.toString(), externalConnections.isEmpty());
XMLUnit.setIgnoreWhitespace(false);
XMLUnit.setNormalizeWhitespace(false);
}
示例5: setUp
import org.custommonkey.xmlunit.XMLUnit; //導入方法依賴的package包/類
@Before
public void setUp() throws IOException {
XMLUnit.setNormalizeWhitespace(true);
}
示例6: setUp
import org.custommonkey.xmlunit.XMLUnit; //導入方法依賴的package包/類
@Before
public void setUp() {
XMLUnit.setNormalizeWhitespace(true);
}
示例7: setUp
import org.custommonkey.xmlunit.XMLUnit; //導入方法依賴的package包/類
@Before
public void setUp() throws IOException {
XMLUnit.setNormalizeWhitespace(true);
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
}
示例8: setUp
import org.custommonkey.xmlunit.XMLUnit; //導入方法依賴的package包/類
@Before
public void setUp() {
// ignore whitespaces difference in "text" node
XMLUnit.setNormalizeWhitespace(true);
}