Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

moved tests around to make room for more

  • Loading branch information...
commit a7c1900e54065a352aa5ab27384983d7db24e189 1 parent 907b592
@tfennelly tfennelly authored
View
14 ...switchyard/cdi/omservice/OMInOutTest.java → ...d/cdi/omservice/basic/BasicInOutTest.java
@@ -20,14 +20,14 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.switchyard.cdi.omservice;
+package org.switchyard.cdi.omservice.basic;
import org.junit.Assert;
import org.junit.Test;
import org.switchyard.*;
import org.switchyard.cdi.AbstractCDITest;
-import org.switchyard.cdi.omservice.service.OrderRequest;
-import org.switchyard.cdi.omservice.service.OrderResponse;
+import org.switchyard.cdi.omservice.model.OrderRequest;
+import org.switchyard.cdi.omservice.model.OrderResponse;
import org.switchyard.internal.ServiceDomains;
import javax.xml.namespace.QName;
@@ -35,18 +35,18 @@
/**
* @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly@gmail.com</a>
*/
-public class OMInOutTest extends AbstractCDITest {
+public class BasicInOutTest extends AbstractCDITest {
@Test
public void test() {
ServiceDomain domain = ServiceDomains.getDomain();
- // Consume the OM service...
+ // Consume the OM model...
MockHandler responseConsumer = new MockHandler();
- Exchange exchange = domain.createExchange(new QName("OrderManagementService"), ExchangePattern.IN_OUT, responseConsumer);
+ Exchange exchange = domain.createExchange(new QName("BasicOrderManagementService"), ExchangePattern.IN_OUT, responseConsumer);
Message inMessage = MessageBuilder.newInstance().buildMessage();
- inMessage.setContent(new OrderRequest("D123"));
+ inMessage.setContent(new OrderRequest("D123", "ABCD"));
exchange.send(inMessage);
View
6 ...rvice/service/OrderManagementService.java → ...ce/basic/BasicOrderManagementService.java
@@ -20,15 +20,17 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.switchyard.cdi.omservice.service;
+package org.switchyard.cdi.omservice.basic;
import org.switchyard.cdi.Service;
+import org.switchyard.cdi.omservice.model.OrderRequest;
+import org.switchyard.cdi.omservice.model.OrderResponse;
/**
* @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly@gmail.com</a>
*/
@Service
-public class OrderManagementService {
+public class BasicOrderManagementService {
public OrderResponse createOrder(OrderRequest request) {
View
6 ...d/cdi/omservice/service/OrderRequest.java → ...ard/cdi/omservice/model/OrderRequest.java
@@ -20,7 +20,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.switchyard.cdi.omservice.service;
+package org.switchyard.cdi.omservice.model;
/**
* @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly@gmail.com</a>
@@ -28,8 +28,10 @@
public class OrderRequest {
public String orderId;
+ public String productId;
- public OrderRequest(String orderId) {
+ public OrderRequest(String orderId, String productId) {
this.orderId = orderId;
+ this.productId = productId;
}
}
View
2  .../cdi/omservice/service/OrderResponse.java → ...rd/cdi/omservice/model/OrderResponse.java
@@ -20,7 +20,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.switchyard.cdi.omservice.service;
+package org.switchyard.cdi.omservice.model;
/**
* @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly@gmail.com</a>
Please sign in to comment.
Something went wrong with that request. Please try again.