Testing the Framework hexagon
By testing the Framework hexagon, we have not just 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, we call the input adapters to trigger the execution of everything necessary in 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 of this book.
For routers, we will put our tests inside the RouterTest
class:
public class RouterTest extends FrameworkTestData { RouterManagementGenericAdapter routerManagementGenericAdapter; public RouterTest() { this.routerManagementGenericAdapter...