Separation of Adapters from Channels
one of the interesting little testing techniques i've encountered with Spring Integration is to create separate xml files for your channel logic and your adapters. this helps in two ways;
- clearly separates your 'logic' from your communications channels (e.g. JMS from Routers)
- can assist with unit testing by attacking separation of concerns
so here's the 'logic' part of spring integration
and here's the 'communications channels' (a simple http inbound gateway)
this will allow us to JUnit test just the logic without testing the http gateway
and here's the 'communications channels' (a simple http inbound gateway)
this will allow us to JUnit test just the logic without testing the http gateway
No comments:
Post a Comment