diff options
Diffstat (limited to 'sandbox/travelsample/contributions/emailgateway/src/test/java')
-rw-r--r-- | sandbox/travelsample/contributions/emailgateway/src/test/java/scatours/emailgateway/EmailGatewayTestCase.java | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/sandbox/travelsample/contributions/emailgateway/src/test/java/scatours/emailgateway/EmailGatewayTestCase.java b/sandbox/travelsample/contributions/emailgateway/src/test/java/scatours/emailgateway/EmailGatewayTestCase.java index 9d16b30cab..e820d30915 100644 --- a/sandbox/travelsample/contributions/emailgateway/src/test/java/scatours/emailgateway/EmailGatewayTestCase.java +++ b/sandbox/travelsample/contributions/emailgateway/src/test/java/scatours/emailgateway/EmailGatewayTestCase.java @@ -19,9 +19,6 @@ package scatours.emailgateway;
-import com.tuscanyscatours.emailgateway.EmailGateway;
-import com.tuscanyscatours.emailgateway.EmailType;
-import com.tuscanyscatours.emailgateway.ObjectFactory;
import org.apache.tuscany.sca.node.SCAClient;
import org.apache.tuscany.sca.node.SCAContribution;
import org.apache.tuscany.sca.node.SCANode;
@@ -30,6 +27,10 @@ import org.junit.AfterClass; import org.junit.BeforeClass;
import org.junit.Test;
+import com.tuscanyscatours.emailgateway.EmailGateway;
+import com.tuscanyscatours.emailgateway.EmailType;
+import com.tuscanyscatours.emailgateway.ObjectFactory;
+
/**
*
*/
@@ -42,15 +43,16 @@ public class EmailGatewayTestCase { @BeforeClass
public static void setUpBeforeClass() throws Exception {
SCANodeFactory factory = SCANodeFactory.newInstance();
- node = factory.createSCANode("emailgateway.composite",
- new SCAContribution("emailgateway", "./target/classes"),
- new SCAContribution("emailgateway-test", "./target/test-classes"));
+ node =
+ factory.createSCANode("emailgateway.composite",
+ new SCAContribution("emailgateway", "./target/classes"),
+ new SCAContribution("emailgateway-test", "./target/test-classes"));
node.start();
}
-
+
@Test
public void testEmailGateway() {
- SCAClient client = (SCAClient) node;
+ SCAClient client = (SCAClient)node;
EmailGateway cc = client.getService(EmailGateway.class, "EmailGatewayClient");
ObjectFactory objectFactory = new ObjectFactory();
EmailType email = objectFactory.createEmailType();
@@ -59,7 +61,7 @@ public class EmailGatewayTestCase { email.setBody("A message");
System.out.println(cc.sendEmail(email));
}
-
+
/**
* @throws java.lang.Exception
*/
|