use of org.contextmapper.dsl.refactoring.SplitSystemIntoSubsystems.SplitBoundedContextRelationshipType in project context-mapper-dsl by ContextMapper.
the class SplitSystemIntoSubsystemsTest method relationshipTypeCanHandleNullValue.
@Test
public void relationshipTypeCanHandleNullValue() {
// given
String label = null;
// when
SplitBoundedContextRelationshipType type = SplitBoundedContextRelationshipType.byLabel(label);
// then
assertEquals(SplitBoundedContextRelationshipType.NEW_CONTEXT_BECOMES_UPSTREAM, type);
}
use of org.contextmapper.dsl.refactoring.SplitSystemIntoSubsystems.SplitBoundedContextRelationshipType in project context-mapper-dsl by ContextMapper.
the class SplitSystemIntoSubsystemsTest method canGetRelationshipTypeByLabel.
@ParameterizedTest
@CsvSource({ "Upstream, NEW_CONTEXT_BECOMES_UPSTREAM", "Downstream, NEW_CONTEXT_BECOMES_DOWNSTREAM" })
public void canGetRelationshipTypeByLabel(String inputLabel, String expectedType) {
// given
String label = inputLabel;
// when
SplitBoundedContextRelationshipType type = SplitBoundedContextRelationshipType.byLabel(label);
// then
assertEquals(SplitBoundedContextRelationshipType.valueOf(expectedType), type);
}
use of org.contextmapper.dsl.refactoring.SplitSystemIntoSubsystems.SplitBoundedContextRelationshipType in project context-mapper-dsl by ContextMapper.
the class SplitSystemIntoSubsystemsTest method canGetRelationshipTypeLabel.
@Test
public void canGetRelationshipTypeLabel() {
// given
SplitBoundedContextRelationshipType upstream = SplitBoundedContextRelationshipType.NEW_CONTEXT_BECOMES_UPSTREAM;
SplitBoundedContextRelationshipType downstream = SplitBoundedContextRelationshipType.NEW_CONTEXT_BECOMES_DOWNSTREAM;
// when
String upstreamLabel = upstream.getLabel();
String downstreamLabel = downstream.getLabel();
// then
assertEquals("Upstream", upstreamLabel);
assertEquals("Downstream", downstreamLabel);
}
Aggregations