Testing the Domain hexagon
To test the Domain hexagon appropriately, we should rely only on its components, ignoring anything coming from other hexagons. After all, these hexagons should depend on the domain and not the other way around. As we have already seen, the Domain hexagon concentrates on the core system logic. It is from that logic we derive the structure and behavior of the Application and Framework hexagons. By building a robust and well-tested Domain hexagon, we're building a solid foundation for the entire system.
Among the operations performed by the topology and inventory system, we can consider adding, removing, and searching network assets as the most important ones. We'll use the following steps to test these operations:
- Let's start by seeing how we can test the addition of network equipment, as follows:
@Test public void addNetworkToSwitch(){ var location = createLocation("US"); var...