private void initializeMixIns() { for (TestMixIn mixIn : getMixIns()) { mixIn.initialize(); } }
/** * Create a new {@link Invoker} instance for invoking a Service in the test ServiceDomain. * @param serviceName The target Service name. * @return The invoker instance. */ public Invoker newInvoker(QName serviceName) { return new Invoker(getServiceDomain(), serviceName); }
/** * Constructs a new TestDataSource. * @param name the name * @param contentType the contentType * @param data the data as a String */ public TestDataSource(String name, String contentType, String data) { setName(name).setContentType(contentType).setDataString(data); }
/** * Cleanup. */ public void cleanup() { undeploy(); cleanupMixIns(); }
/** * Create a new {@link Invoker} instance for invoking a Service in the test ServiceDomain. * @param serviceName The target Service name. Can be a serialized {@link QName}. Can also * include the operation name e.g. "OrderManagementService.createOrder". * @return The invoker instance. */ public Invoker newInvoker(String serviceName) { return newInvoker(createQName(serviceName)); }
/** * invoke the methods annotated with {@link BeforeDeploy} on test class and deploy SwitchYard application. * * @throws Exception failed to deploy */ public void start() throws Exception { beforeDeploy(); deploy(); }
@Override public void close() throws IOException { super.close(); setData(toByteArray()); } };
/** * Wait for a message. * @return MockHandler mockhandler */ public MockHandler waitForOKMessage() { waitFor(_messages, 1); return this; }
/** * Set the response handler. * @param handler The response handler. * @return This invoker instance. */ public Invoker responseHandler(ExchangeHandler handler) { if (handler != null) { _exchangeHandlerProxy = createHandlerProxy(handler); } return this; }
/** * Load the SwitchYard configuration model specified by the configModel stream. * @param configModel The config model stream. * @param validate Validate the model? * @return The SwitchYard config model. */ public SwitchYardModel loadSwitchYardModel(InputStream configModel, boolean validate) { return loadConfigModel(configModel, SwitchYardModel.class, validate); }
/** * Constructs a new TestDataSource. * @param name the name */ public TestDataSource(String name) { setName(name); }
/** * Create an {@link Exchange} instance for the target service operation. * @param handler The ExchangeHandler to be used on the Exchange. * @return The Exchange instance. */ public Exchange createExchange(ExchangeHandler handler) { return createExchange(null, handler); }
private void initializeMixIns() { for (TestMixIn mixIn : getMixIns()) { mixIn.initialize(); } }
/** * Create a new {@link Invoker} instance for invoking a Service in the test ServiceDomain. * @param serviceName The target Service name. * @return The invoker instance. */ public Invoker newInvoker(QName serviceName) { return new Invoker(getServiceDomain(), serviceName); }
/** * Cleanup. */ public void cleanup() { undeploy(); cleanupMixIns(); }
/** * Create a new {@link Invoker} instance for invoking a Service in the test ServiceDomain. * @param serviceName The target Service name. Can be a serialized {@link QName}. Can also * include the operation name e.g. "OrderManagementService.createOrder". * @return The invoker instance. */ public Invoker newInvoker(String serviceName) { return newInvoker(createQName(serviceName)); }
/** * invoke the methods annotated with {@link BeforeDeploy} on test class and deploy SwitchYard application. * * @throws Exception failed to deploy */ public void start() throws Exception { beforeDeploy(); deploy(); }
/** * Wait for a number of messages. * @return MockHandler mockhandler */ public MockHandler waitForFaultMessage() { waitFor(_faults, 1); return this; }