org.springframework.test.util.XmlExpectationsHelper Java Examples

The following examples show how to use org.springframework.test.util.XmlExpectationsHelper. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DefaultWebTestClient.java    From spring-analysis-note with MIT License 5 votes vote down vote up
@Override
public BodyContentSpec xml(String expectedXml) {
	this.result.assertWithDiagnostics(() -> {
		try {
			new XmlExpectationsHelper().assertXmlEqual(expectedXml, getBodyAsString());
		}
		catch (Exception ex) {
			throw new AssertionError("XML parsing error", ex);
		}
	});
	return this;
}
 
Example #2
Source File: DefaultWebTestClient.java    From java-technology-stack with MIT License 5 votes vote down vote up
@Override
public BodyContentSpec xml(String expectedXml) {
	this.result.assertWithDiagnostics(() -> {
		try {
			new XmlExpectationsHelper().assertXmlEqual(expectedXml, getBodyAsString());
		}
		catch (Exception ex) {
			throw new AssertionError("XML parsing error", ex);
		}
	});
	return this;
}
 
Example #3
Source File: ContentResultMatchers.java    From spring-analysis-note with MIT License 4 votes vote down vote up
/**
 * Protected constructor.
 * Use {@link MockMvcResultMatchers#content()}.
 */
protected ContentResultMatchers() {
	this.xmlHelper = new XmlExpectationsHelper();
	this.jsonHelper = new JsonExpectationsHelper();
}
 
Example #4
Source File: ContentRequestMatchers.java    From spring-analysis-note with MIT License 4 votes vote down vote up
/**
 * Class constructor, not for direct instantiation.
 * Use {@link MockRestRequestMatchers#content()}.
 */
protected ContentRequestMatchers() {
	this.xmlHelper = new XmlExpectationsHelper();
	this.jsonHelper = new JsonExpectationsHelper();
}
 
Example #5
Source File: ContentResultMatchers.java    From java-technology-stack with MIT License 4 votes vote down vote up
/**
 * Protected constructor.
 * Use {@link MockMvcResultMatchers#content()}.
 */
protected ContentResultMatchers() {
	this.xmlHelper = new XmlExpectationsHelper();
	this.jsonHelper = new JsonExpectationsHelper();
}
 
Example #6
Source File: ContentRequestMatchers.java    From java-technology-stack with MIT License 4 votes vote down vote up
/**
 * Class constructor, not for direct instantiation.
 * Use {@link MockRestRequestMatchers#content()}.
 */
protected ContentRequestMatchers() {
	this.xmlHelper = new XmlExpectationsHelper();
	this.jsonHelper = new JsonExpectationsHelper();
}
 
Example #7
Source File: ContentResultMatchers.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
/**
 * Protected constructor.
 * Use {@link MockMvcResultMatchers#content()}.
 */
protected ContentResultMatchers() {
	this.xmlHelper = new XmlExpectationsHelper();
	this.jsonHelper = new JsonExpectationsHelper();
}
 
Example #8
Source File: ContentRequestMatchers.java    From spring4-understanding with Apache License 2.0 2 votes vote down vote up
/**
 * Class constructor, not for direct instantiation.
 * Use {@link MockRestRequestMatchers#content()}.
 */
protected ContentRequestMatchers() {
	this.xmlHelper = new XmlExpectationsHelper();
}