public void shouldCreateEmptyLoop() {
// given
String loopBlueprint = "blueprint";
- String loopSvg = "representation";
- Loop testLoop = createTestLoop(EXAMPLE_LOOP_NAME, loopBlueprint, loopSvg);
+ Loop testLoop = createTestLoop(EXAMPLE_LOOP_NAME, loopBlueprint);
testLoop.setGlobalPropertiesJson(JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class));
testLoop.setLastComputedState(LoopState.DESIGN);
assertThat(actualLoop).isNotNull();
assertThat(actualLoop).isEqualTo(loopsRepository.findById(actualLoop.getName()).get());
assertThat(actualLoop.getName()).isEqualTo(EXAMPLE_LOOP_NAME);
- assertThat(actualLoop.getSvgRepresentation()).isEqualTo(loopSvg);
assertThat(actualLoop.getGlobalPropertiesJson().getAsJsonPrimitive("testName").getAsString())
.isEqualTo("testValue");
}
}
private void saveTestLoopToDb() {
- Loop testLoop = createTestLoop(EXAMPLE_LOOP_NAME, "blueprint", "representation");
+ Loop testLoop = createTestLoop(EXAMPLE_LOOP_NAME, "blueprint");
testLoop.setGlobalPropertiesJson(JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class));
LoopTemplate template = new LoopTemplate();
template.setName("testTemplate");
assertThat(microServicePolicyService.isExisting("policyName")).isTrue();
}
- private Loop createTestLoop(String loopName, String loopBlueprint, String loopSvg) {
- return new Loop(loopName, loopSvg);
+ private Loop createTestLoop(String loopName, String loopBlueprint) {
+ return new Loop(loopName);
}
}
\ No newline at end of file