diff --git a/pom.xml b/pom.xml index 5a8fe8d..2aab438 100644 --- a/pom.xml +++ b/pom.xml @@ -62,40 +62,6 @@ 1.8 - - - org.codehaus.mojo - jaxws-maven-plugin - 1.12 - - - wsimport-from-jdk - - wsimport - - - - - - - - http://www.thomas-bayer.com/axis2/services/BLZService?wsdl - - - - - - - - - - true - - generated - - src/generated/java - - org.codehaus.mojo build-helper-maven-plugin diff --git a/src/generated/java/generated/org/tempuri/Add.java b/src/generated/java/generated/org/tempuri/Add.java new file mode 100644 index 0000000..f8f1a6f --- /dev/null +++ b/src/generated/java/generated/org/tempuri/Add.java @@ -0,0 +1,73 @@ + +package generated.org.tempuri; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="intA" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="intB" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "intA", + "intB" +}) +@XmlRootElement(name = "Add") +public class Add { + + protected int intA; + protected int intB; + + /** + * Gets the value of the intA property. + * + */ + public int getIntA() { + return intA; + } + + /** + * Sets the value of the intA property. + * + */ + public void setIntA(int value) { + this.intA = value; + } + + /** + * Gets the value of the intB property. + * + */ + public int getIntB() { + return intB; + } + + /** + * Sets the value of the intB property. + * + */ + public void setIntB(int value) { + this.intB = value; + } + +} diff --git a/src/generated/java/generated/org/tempuri/AddResponse.java b/src/generated/java/generated/org/tempuri/AddResponse.java new file mode 100644 index 0000000..25b5f44 --- /dev/null +++ b/src/generated/java/generated/org/tempuri/AddResponse.java @@ -0,0 +1,56 @@ + +package generated.org.tempuri; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="AddResult" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "addResult" +}) +@XmlRootElement(name = "AddResponse") +public class AddResponse { + + @XmlElement(name = "AddResult") + protected int addResult; + + /** + * Gets the value of the addResult property. + * + */ + public int getAddResult() { + return addResult; + } + + /** + * Sets the value of the addResult property. + * + */ + public void setAddResult(int value) { + this.addResult = value; + } + +} diff --git a/src/generated/java/generated/org/tempuri/Calculator.java b/src/generated/java/generated/org/tempuri/Calculator.java new file mode 100644 index 0000000..fcc302c --- /dev/null +++ b/src/generated/java/generated/org/tempuri/Calculator.java @@ -0,0 +1,97 @@ + +package generated.org.tempuri; + +import org.springframework.context.annotation.Bean; + +import java.net.MalformedURLException; +import java.net.URL; +import javax.xml.namespace.QName; +import javax.xml.ws.Service; +import javax.xml.ws.WebEndpoint; +import javax.xml.ws.WebServiceClient; +import javax.xml.ws.WebServiceException; +import javax.xml.ws.WebServiceFeature; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.2.9-b130926.1035 + * Generated source version: 2.2 + * + */ + +@WebServiceClient(name = "Calculator", targetNamespace = "http://tempuri.org/", wsdlLocation = "file:/D:/JavaProject/perlab/testng-spring-soap/calc.xml") +public class Calculator + extends Service +{ + + private final static URL CALCULATOR_WSDL_LOCATION; + private final static WebServiceException CALCULATOR_EXCEPTION; + private final static QName CALCULATOR_QNAME = new QName("http://tempuri.org/", "Calculator"); + + static { + URL url = null; + WebServiceException e = null; + try { + url = new URL("file:/D:/JavaProject/perlab/testng-spring-soap/calc.xml"); + } catch (MalformedURLException ex) { + e = new WebServiceException(ex); + } + CALCULATOR_WSDL_LOCATION = url; + CALCULATOR_EXCEPTION = e; + } + + public Calculator() { + super(__getWsdlLocation(), CALCULATOR_QNAME); + } + + public Calculator(WebServiceFeature... features) { + super(__getWsdlLocation(), CALCULATOR_QNAME, features); + } + + public Calculator(URL wsdlLocation) { + super(wsdlLocation, CALCULATOR_QNAME); + } + + public Calculator(URL wsdlLocation, WebServiceFeature... features) { + super(wsdlLocation, CALCULATOR_QNAME, features); + } + + public Calculator(URL wsdlLocation, QName serviceName) { + super(wsdlLocation, serviceName); + } + + public Calculator(URL wsdlLocation, QName serviceName, WebServiceFeature... features) { + super(wsdlLocation, serviceName, features); + } + + /** + * + * @return + * returns CalculatorSoap + */ + @WebEndpoint(name = "CalculatorSoap") + public CalculatorSoap getCalculatorSoap() { + return super.getPort(new QName("http://tempuri.org/", "CalculatorSoap"), CalculatorSoap.class); + } + + /** + * + * @param features + * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the features parameter will have their default values. + * @return + * returns CalculatorSoap + */ + @WebEndpoint(name = "CalculatorSoap") + public CalculatorSoap getCalculatorSoap(WebServiceFeature... features) { + return super.getPort(new QName("http://tempuri.org/", "CalculatorSoap"), CalculatorSoap.class, features); + } + + private static URL __getWsdlLocation() { + if (CALCULATOR_EXCEPTION!= null) { + throw CALCULATOR_EXCEPTION; + } + return CALCULATOR_WSDL_LOCATION; + } + +} diff --git a/src/generated/java/generated/org/tempuri/CalculatorSoap.java b/src/generated/java/generated/org/tempuri/CalculatorSoap.java new file mode 100644 index 0000000..a314f30 --- /dev/null +++ b/src/generated/java/generated/org/tempuri/CalculatorSoap.java @@ -0,0 +1,95 @@ + +package generated.org.tempuri; + +import javax.jws.WebMethod; +import javax.jws.WebParam; +import javax.jws.WebResult; +import javax.jws.WebService; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.ws.RequestWrapper; +import javax.xml.ws.ResponseWrapper; + + +/** + * This class was generated by the JAX-WS RI. + * JAX-WS RI 2.2.9-b130926.1035 + * Generated source version: 2.2 + * + */ +@WebService(name = "CalculatorSoap", targetNamespace = "http://tempuri.org/") +@XmlSeeAlso({ + ObjectFactory.class +}) +public interface CalculatorSoap { + + + /** + * Adds two integers. This is a test WebService. �DNE Online + * + * @param intB + * @param intA + * @return + * returns int + */ + @WebMethod(operationName = "Add", action = "http://tempuri.org/Add") + @WebResult(name = "AddResult", targetNamespace = "http://tempuri.org/") + @RequestWrapper(localName = "Add", targetNamespace = "http://tempuri.org/", className = "org.tempuri.Add") + @ResponseWrapper(localName = "AddResponse", targetNamespace = "http://tempuri.org/", className = "org.tempuri.AddResponse") + public int add( + @WebParam(name = "intA", targetNamespace = "http://tempuri.org/") + int intA, + @WebParam(name = "intB", targetNamespace = "http://tempuri.org/") + int intB); + + /** + * + * @param intB + * @param intA + * @return + * returns int + */ + @WebMethod(operationName = "Subtract", action = "http://tempuri.org/Subtract") + @WebResult(name = "SubtractResult", targetNamespace = "http://tempuri.org/") + @RequestWrapper(localName = "Subtract", targetNamespace = "http://tempuri.org/", className = "org.tempuri.Subtract") + @ResponseWrapper(localName = "SubtractResponse", targetNamespace = "http://tempuri.org/", className = "org.tempuri.SubtractResponse") + public int subtract( + @WebParam(name = "intA", targetNamespace = "http://tempuri.org/") + int intA, + @WebParam(name = "intB", targetNamespace = "http://tempuri.org/") + int intB); + + /** + * + * @param intB + * @param intA + * @return + * returns int + */ + @WebMethod(operationName = "Multiply", action = "http://tempuri.org/Multiply") + @WebResult(name = "MultiplyResult", targetNamespace = "http://tempuri.org/") + @RequestWrapper(localName = "Multiply", targetNamespace = "http://tempuri.org/", className = "org.tempuri.Multiply") + @ResponseWrapper(localName = "MultiplyResponse", targetNamespace = "http://tempuri.org/", className = "org.tempuri.MultiplyResponse") + public int multiply( + @WebParam(name = "intA", targetNamespace = "http://tempuri.org/") + int intA, + @WebParam(name = "intB", targetNamespace = "http://tempuri.org/") + int intB); + + /** + * + * @param intB + * @param intA + * @return + * returns int + */ + @WebMethod(operationName = "Divide", action = "http://tempuri.org/Divide") + @WebResult(name = "DivideResult", targetNamespace = "http://tempuri.org/") + @RequestWrapper(localName = "Divide", targetNamespace = "http://tempuri.org/", className = "org.tempuri.Divide") + @ResponseWrapper(localName = "DivideResponse", targetNamespace = "http://tempuri.org/", className = "org.tempuri.DivideResponse") + public int divide( + @WebParam(name = "intA", targetNamespace = "http://tempuri.org/") + int intA, + @WebParam(name = "intB", targetNamespace = "http://tempuri.org/") + int intB); + +} diff --git a/src/generated/java/generated/org/tempuri/Divide.java b/src/generated/java/generated/org/tempuri/Divide.java new file mode 100644 index 0000000..e937545 --- /dev/null +++ b/src/generated/java/generated/org/tempuri/Divide.java @@ -0,0 +1,73 @@ + +package generated.org.tempuri; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="intA" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="intB" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "intA", + "intB" +}) +@XmlRootElement(name = "Divide") +public class Divide { + + protected int intA; + protected int intB; + + /** + * Gets the value of the intA property. + * + */ + public int getIntA() { + return intA; + } + + /** + * Sets the value of the intA property. + * + */ + public void setIntA(int value) { + this.intA = value; + } + + /** + * Gets the value of the intB property. + * + */ + public int getIntB() { + return intB; + } + + /** + * Sets the value of the intB property. + * + */ + public void setIntB(int value) { + this.intB = value; + } + +} diff --git a/src/generated/java/generated/org/tempuri/DivideResponse.java b/src/generated/java/generated/org/tempuri/DivideResponse.java new file mode 100644 index 0000000..885d318 --- /dev/null +++ b/src/generated/java/generated/org/tempuri/DivideResponse.java @@ -0,0 +1,56 @@ + +package generated.org.tempuri; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DivideResult" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "divideResult" +}) +@XmlRootElement(name = "DivideResponse") +public class DivideResponse { + + @XmlElement(name = "DivideResult") + protected int divideResult; + + /** + * Gets the value of the divideResult property. + * + */ + public int getDivideResult() { + return divideResult; + } + + /** + * Sets the value of the divideResult property. + * + */ + public void setDivideResult(int value) { + this.divideResult = value; + } + +} diff --git a/src/generated/java/generated/org/tempuri/Multiply.java b/src/generated/java/generated/org/tempuri/Multiply.java new file mode 100644 index 0000000..44d78c8 --- /dev/null +++ b/src/generated/java/generated/org/tempuri/Multiply.java @@ -0,0 +1,73 @@ + +package generated.org.tempuri; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="intA" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="intB" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "intA", + "intB" +}) +@XmlRootElement(name = "Multiply") +public class Multiply { + + protected int intA; + protected int intB; + + /** + * Gets the value of the intA property. + * + */ + public int getIntA() { + return intA; + } + + /** + * Sets the value of the intA property. + * + */ + public void setIntA(int value) { + this.intA = value; + } + + /** + * Gets the value of the intB property. + * + */ + public int getIntB() { + return intB; + } + + /** + * Sets the value of the intB property. + * + */ + public void setIntB(int value) { + this.intB = value; + } + +} diff --git a/src/generated/java/generated/org/tempuri/MultiplyResponse.java b/src/generated/java/generated/org/tempuri/MultiplyResponse.java new file mode 100644 index 0000000..a25e076 --- /dev/null +++ b/src/generated/java/generated/org/tempuri/MultiplyResponse.java @@ -0,0 +1,56 @@ + +package generated.org.tempuri; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="MultiplyResult" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "multiplyResult" +}) +@XmlRootElement(name = "MultiplyResponse") +public class MultiplyResponse { + + @XmlElement(name = "MultiplyResult") + protected int multiplyResult; + + /** + * Gets the value of the multiplyResult property. + * + */ + public int getMultiplyResult() { + return multiplyResult; + } + + /** + * Sets the value of the multiplyResult property. + * + */ + public void setMultiplyResult(int value) { + this.multiplyResult = value; + } + +} diff --git a/src/generated/java/generated/org/tempuri/ObjectFactory.java b/src/generated/java/generated/org/tempuri/ObjectFactory.java new file mode 100644 index 0000000..1901df4 --- /dev/null +++ b/src/generated/java/generated/org/tempuri/ObjectFactory.java @@ -0,0 +1,96 @@ + +package generated.org.tempuri; + +import javax.xml.bind.annotation.XmlRegistry; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the org.tempuri package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.tempuri + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link Add } + * + */ + public Add createAdd() { + return new Add(); + } + + /** + * Create an instance of {@link Divide } + * + */ + public Divide createDivide() { + return new Divide(); + } + + /** + * Create an instance of {@link MultiplyResponse } + * + */ + public MultiplyResponse createMultiplyResponse() { + return new MultiplyResponse(); + } + + /** + * Create an instance of {@link DivideResponse } + * + */ + public DivideResponse createDivideResponse() { + return new DivideResponse(); + } + + /** + * Create an instance of {@link SubtractResponse } + * + */ + public SubtractResponse createSubtractResponse() { + return new SubtractResponse(); + } + + /** + * Create an instance of {@link Multiply } + * + */ + public Multiply createMultiply() { + return new Multiply(); + } + + /** + * Create an instance of {@link Subtract } + * + */ + public Subtract createSubtract() { + return new Subtract(); + } + + /** + * Create an instance of {@link AddResponse } + * + */ + public AddResponse createAddResponse() { + return new AddResponse(); + } + +} diff --git a/src/generated/java/generated/org/tempuri/Subtract.java b/src/generated/java/generated/org/tempuri/Subtract.java new file mode 100644 index 0000000..b910c36 --- /dev/null +++ b/src/generated/java/generated/org/tempuri/Subtract.java @@ -0,0 +1,73 @@ + +package generated.org.tempuri; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="intA" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="intB" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "intA", + "intB" +}) +@XmlRootElement(name = "Subtract") +public class Subtract { + + protected int intA; + protected int intB; + + /** + * Gets the value of the intA property. + * + */ + public int getIntA() { + return intA; + } + + /** + * Sets the value of the intA property. + * + */ + public void setIntA(int value) { + this.intA = value; + } + + /** + * Gets the value of the intB property. + * + */ + public int getIntB() { + return intB; + } + + /** + * Sets the value of the intB property. + * + */ + public void setIntB(int value) { + this.intB = value; + } + +} diff --git a/src/generated/java/generated/org/tempuri/SubtractResponse.java b/src/generated/java/generated/org/tempuri/SubtractResponse.java new file mode 100644 index 0000000..8976a46 --- /dev/null +++ b/src/generated/java/generated/org/tempuri/SubtractResponse.java @@ -0,0 +1,56 @@ + +package generated.org.tempuri; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SubtractResult" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "subtractResult" +}) +@XmlRootElement(name = "SubtractResponse") +public class SubtractResponse { + + @XmlElement(name = "SubtractResult") + protected int subtractResult; + + /** + * Gets the value of the subtractResult property. + * + */ + public int getSubtractResult() { + return subtractResult; + } + + /** + * Sets the value of the subtractResult property. + * + */ + public void setSubtractResult(int value) { + this.subtractResult = value; + } + +} diff --git a/src/generated/java/generated/org/tempuri/package-info.java b/src/generated/java/generated/org/tempuri/package-info.java new file mode 100644 index 0000000..4c100e5 --- /dev/null +++ b/src/generated/java/generated/org/tempuri/package-info.java @@ -0,0 +1,2 @@ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://tempuri.org/", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +package generated.org.tempuri; diff --git a/src/main/java/me/darkweird/testing/config/CalculatorConfig.java b/src/main/java/me/darkweird/testing/config/CalculatorConfig.java new file mode 100644 index 0000000..5e25756 --- /dev/null +++ b/src/main/java/me/darkweird/testing/config/CalculatorConfig.java @@ -0,0 +1,15 @@ +package me.darkweird.testing.config; + +import generated.org.tempuri.Calculator; +import generated.org.tempuri.CalculatorSoap; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class CalculatorConfig { + + @Bean + public CalculatorSoap getCalculatorSoap() { + return new Calculator().getCalculatorSoap(); + } +} diff --git a/src/test/java/me/darkweird/testing/spring/TestCalc.java b/src/test/java/me/darkweird/testing/spring/TestCalc.java new file mode 100644 index 0000000..49097e6 --- /dev/null +++ b/src/test/java/me/darkweird/testing/spring/TestCalc.java @@ -0,0 +1,33 @@ +package me.darkweird.testing.spring; + +import generated.org.tempuri.CalculatorSoap; +import org.springframework.beans.factory.annotation.Autowired; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class TestCalc extends SpringBaseTest { + + @Autowired + CalculatorSoap calculatorSoap; + + @Test + public void add(){ + Assert.assertEquals(calculatorSoap.add(2,2), 4); + } + + @Test + public void divide(){ + Assert.assertEquals(calculatorSoap.divide(3,3), 1); + } + + @Test + public void multiply(){ + Assert.assertEquals(calculatorSoap.multiply(3,3), 9); + } + + @Test + public void subtract(){ + Assert.assertEquals(calculatorSoap.subtract(5,3), 2); + } +} +