本文整理汇总了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);
}