Testing the Framework hexagon
By testing the Framework hexagon, we not only have the opportunity to check whether the input and output adapters are working well but we can also test whether the other hexagons, Domain and Application, are doing their part in response to the requests coming from the Framework hexagon.
To test it, we call the input adapters to trigger the execution of everything necessary in the downstream hexagons to fulfill the request. We start by implementing tests for the router management adapters. The tests for switches and networks follow the same pattern and are available in the GitHub repository for this book.
For the routers, we will put our tests into the RouterTest
class:
public class RouterTest extends FrameworkTestData { RouterManagementGenericAdapter routerManagementGenericAdapter; public RouterTest() { this.routerManagementGenericAdapter...