// Path: step10_simple_app_with_cxf-spring-boot-starter/src/test/java/de/jonashackt/tutorial/SimpleBootCxfSystemTestApplication.java
// @Configuration
// @Import({
//         SimpleBootCxfSystemTestConfiguration.class,
//         SimpleBootCxfApplication.class
// })
// public class SimpleBootCxfSystemTestApplication {
// 
// }
// 
// Path: step10_simple_app_with_cxf-spring-boot-starter/src/main/java/de/jonashackt/tutorial/common/CustomIds.java
// public enum CustomIds {
// 
// 	EVERYTHING_FINE("01", "The Weather-Call was successfully processed by the backend."),
// 	NON_XML_COMPLIANT("71", "XML-Scheme-validiation failed."),
// 	COMPLETE_USELESS_XML("72", "Syntactically incorrect XML."),
// 	SOMETHING_ELSE_WENT_TERRIBLY_WRONG("99", "Backend processing failed.");
// 
// 	private String id;
// 	private String message;
// 
// 	private CustomIds(String id, String text) {
// 		this.id = id;
// 		this.message = text;
// 	}
// 	
// 	public String getMessage() {
// 		return message;
// 	}
// 	
// 	public String getId() {
// 		return id;
// 	}
// 	
// }


import de.codecentric.cxf.common.BootStarterCxfException;
import de.codecentric.cxf.common.FaultType;
import de.codecentric.cxf.soaprawclient.SoapRawClient;
import de.codecentric.cxf.soaprawclient.SoapRawClientResponse;
import de.jonashackt.tutorial.SimpleBootCxfSystemTestApplication;
import de.jonashackt.tutorial.common.CustomIds;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.core.io.Resource;
import org.springframework.test.context.junit4.SpringRunner;
import java.io.IOException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
package de.jonashackt.tutorial.xmlvalidation;






@RunWith(SpringRunner.class)
@SpringBootTest(
		classes=SimpleBootCxfSystemTestApplication.class,
		webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT,
		properties = { "server.port:8087"})
public class WeatherServiceXmlErrorSystemTest {

	@Autowired
	private SoapRawClient soapRawClient;
	
	
	@Value(value="classpath:requests/xmlerrors/xmlErrorNotXmlSchemeCompliantUnderRootElementTest.xml")
	private Resource xmlErrorNotXmlSchemeCompliantUnderRootElementTestXml;
	
	@Value(value="classpath:requests/xmlerrors/xmlErrorNotXmlSchemeCompliantRootElementTest.xml")
	private Resource xmlErrorNotXmlSchemeCompliantRootElementTestXml;
	
	@Value(value="classpath:requests/xmlerrors/xmlErrorSoapHeaderMissingSlash.xml")
	private Resource xmlErrorSoapHeaderMissingSlashXml;
	
	@Value(value="classpath:requests/xmlerrors/xmlErrorSoapBodyTagMissingBracketTest.xml")
	private Resource xmlErrorSoapBodyTagMissingBracketTestXml;
	
	@Value(value="classpath:requests/xmlerrors/xmlErrorSoapHeaderTagMissingBracketTest.xml")
	private Resource xmlErrorSoapHeaderTagMissingBracketTestXml;
	
	@Value(value="classpath:requests/xmlerrors/xmlErrorSoapEnvelopeTagMissingBracketTest.xml")
	private Resource xmlErrorSoapEnvelopeTagMissingBracketTestXml;
	
	@Value(value="classpath:requests/xmlerrors/xmlErrorXMLHeaderDefinitionMissingBracket.xml")
	private Resource xmlErrorXMLHeaderDefinitionMissingBracketXml;
	
	@Value(value="classpath:requests/xmlerrors/xmlErrorXMLTagNotClosedInsideBodyTest.xml")
	private Resource xmlErrorXMLTagNotClosedInsideBodyTestXml;
	
	
	
	/*
	 * Non-Scheme-compliant Errors
	 */
	
	@Test
// Path: step10_simple_app_with_cxf-spring-boot-starter/src/test/java/de/jonashackt/tutorial/SimpleBootCxfSystemTestApplication.java
// @Configuration
// @Import({
//         SimpleBootCxfSystemTestConfiguration.class,
//         SimpleBootCxfApplication.class
// })
// public class SimpleBootCxfSystemTestApplication {
// 
// }
// 
// Path: step10_simple_app_with_cxf-spring-boot-starter/src/main/java/de/jonashackt/tutorial/common/CustomIds.java
// public enum CustomIds {
// 
// 	EVERYTHING_FINE("01", "The Weather-Call was successfully processed by the backend."),
// 	NON_XML_COMPLIANT("71", "XML-Scheme-validiation failed."),
// 	COMPLETE_USELESS_XML("72", "Syntactically incorrect XML."),
// 	SOMETHING_ELSE_WENT_TERRIBLY_WRONG("99", "Backend processing failed.");
// 
// 	private String id;
// 	private String message;
// 
// 	private CustomIds(String id, String text) {
// 		this.id = id;
// 		this.message = text;
// 	}
// 	
// 	public String getMessage() {
// 		return message;
// 	}
// 	
// 	public String getId() {
// 		return id;
// 	}
// 	
// }


// Path: step10_simple_app_with_cxf-spring-boot-starter/src/test/java/de/jonashackt/tutorial/xmlvalidation/WeatherServiceXmlErrorSystemTest.java
import de.codecentric.cxf.common.BootStarterCxfException;
import de.codecentric.cxf.common.FaultType;
import de.codecentric.cxf.soaprawclient.SoapRawClient;
import de.codecentric.cxf.soaprawclient.SoapRawClientResponse;
import de.jonashackt.tutorial.SimpleBootCxfSystemTestApplication;
import de.jonashackt.tutorial.common.CustomIds;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.core.io.Resource;
import org.springframework.test.context.junit4.SpringRunner;
import java.io.IOException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

package de.jonashackt.tutorial.xmlvalidation;






@RunWith(SpringRunner.class)
@SpringBootTest(
		classes=SimpleBootCxfSystemTestApplication.class,
		webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT,
		properties = { "server.port:8087"})
public class WeatherServiceXmlErrorSystemTest {

	@Autowired
	private SoapRawClient soapRawClient;
	
	
	@Value(value="classpath:requests/xmlerrors/xmlErrorNotXmlSchemeCompliantUnderRootElementTest.xml")
	private Resource xmlErrorNotXmlSchemeCompliantUnderRootElementTestXml;
	
	@Value(value="classpath:requests/xmlerrors/xmlErrorNotXmlSchemeCompliantRootElementTest.xml")
	private Resource xmlErrorNotXmlSchemeCompliantRootElementTestXml;
	
	@Value(value="classpath:requests/xmlerrors/xmlErrorSoapHeaderMissingSlash.xml")
	private Resource xmlErrorSoapHeaderMissingSlashXml;
	
	@Value(value="classpath:requests/xmlerrors/xmlErrorSoapBodyTagMissingBracketTest.xml")
	private Resource xmlErrorSoapBodyTagMissingBracketTestXml;
	
	@Value(value="classpath:requests/xmlerrors/xmlErrorSoapHeaderTagMissingBracketTest.xml")
	private Resource xmlErrorSoapHeaderTagMissingBracketTestXml;
	
	@Value(value="classpath:requests/xmlerrors/xmlErrorSoapEnvelopeTagMissingBracketTest.xml")
	private Resource xmlErrorSoapEnvelopeTagMissingBracketTestXml;
	
	@Value(value="classpath:requests/xmlerrors/xmlErrorXMLHeaderDefinitionMissingBracket.xml")
	private Resource xmlErrorXMLHeaderDefinitionMissingBracketXml;
	
	@Value(value="classpath:requests/xmlerrors/xmlErrorXMLTagNotClosedInsideBodyTest.xml")
	private Resource xmlErrorXMLTagNotClosedInsideBodyTestXml;
	
	
	
	/*
	 * Non-Scheme-compliant Errors
	 */
	
	@Test
	public void xmlErrorNotXmlSchemeCompliantUnderRootElementTest() throws BootStarterCxfException, IOException {