Last active
July 24, 2016 13:33
-
-
Save bogdanalbei/7e2cf35750a8a83b8abcc96be623fe1f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @RunWith(CamelSpringJUnit4ClassRunner.class) | |
| @ContextConfiguration( | |
| classes = {GroceriesRouteBuilderTest.ContextConfig.class}, | |
| loader = CamelSpringDelegatingTestContextLoader.class) | |
| @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD) | |
| public class GroceriesRouteBuilderTest { | |
| @Autowired | |
| @Qualifier(GroceriesRouteBuilder.FRUIT_PROCESSOR) | |
| MockEndpoint fruitProcessor; | |
| @Autowired | |
| @Qualifier(GroceriesRouteBuilder.VEGETABLE_PROCESSOR) | |
| MockEndpoint vegetableProcessor; | |
| @Autowired | |
| CamelContext camelContext; | |
| @Configuration | |
| public static class ContextConfig extends SingleRouteCamelConfiguration { | |
| @Override | |
| public RouteBuilder route() { | |
| return new GroceriesRouteBuilder(); | |
| } | |
| @Bean | |
| @Qualifier(GroceriesRouteBuilder.FRUIT_PROCESSOR) | |
| MockEndpoint fruitProcessor() { | |
| return new MockEndpoint(); | |
| } | |
| @Bean | |
| @Qualifier(GroceriesRouteBuilder.VEGETABLE_PROCESSOR) | |
| MockEndpoint vegetableProcessor() { | |
| return new MockEndpoint(); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment