@Before public void setUp() throws Exception { _puller = new ModelPuller<CompositeModel>(); CompositeModel composite = _puller.pull("/HelloSwitchYard.xml", getClass()); composite.assertModelValid(); CompositeServiceModel compositeService = composite.getServices().get(0); _config = (HttpBindingModel) compositeService.getBindings().get(0); // Massive hack for Test Runner. Register both a service and a reference binding. _domain.registerService(_config.getServiceName(), new InOutService(), mockService); _domain.registerServiceReference(_config.getServiceName(), new InOutService()); _httpInbound = new InboundHandler(_config, _domain); _httpInbound.start(); CompositeReferenceModel compositeReference = composite.getReferences().get(0); _configRef = (HttpBindingModel) compositeReference.getBindings().get(0); _httpOutbound = new OutboundHandler(_configRef); // Massive hack for Test Runner. Register both a service and a reference binding. _domain.registerService(_configRef.getServiceName(), new HelloInterface(), _httpOutbound); _domain.registerServiceReference(_configRef.getServiceName(), new HelloInterface()); _httpOutbound.start(); }
@After public void tearDown() throws Exception { _httpInbound.stop(); _httpOutbound.stop(); }