Commit b6724197 authored by Benedikt Kleinmeier's avatar Benedikt Kleinmeier

Fixed JSON transformation unit tests after renaming the transformations

parent e218e7b1
......@@ -27,7 +27,7 @@ public class TargetVersionV1_2Test extends JsonTransformationTest {
assertThat(typeOld, equalTo("CSV_CACHE"));
TargetVersionV1_2 transform = factory.getJsonTransformationV1_1ToV1_2();
TargetVersionV1_2 transform = factory.getTargetVersionV1_2();
JsonNode jsonNew = transform.applyAll(old);
String typeNew =pathMustExist(jsonNew, "scenario/attributesModel/org.vadere.state.attributes.models.AttributesFloorField/cacheType").asText();
......@@ -42,7 +42,7 @@ public class TargetVersionV1_2Test extends JsonTransformationTest {
assertThat(typeOld, equalTo("BIN_CACHE"));
TargetVersionV1_2 transform = factory.getJsonTransformationV1_1ToV1_2();
TargetVersionV1_2 transform = factory.getTargetVersionV1_2();
JsonNode jsonNew = transform.applyAll(old);
String typeNew =pathMustExist(jsonNew, "scenario/attributesModel/org.vadere.state.attributes.models.AttributesFloorField/cacheType").asText();
......
......@@ -25,7 +25,7 @@ public class TargetVersionV1_4Test extends JsonTransformationTest {
pathMustExist(oldScenarioAsJson, oldJsonPath);
pathMustNotExist(oldScenarioAsJson, newJsonPath);
TargetVersionV1_4 transform = factory.getJsonTransformationV1_3ToV1_4();
TargetVersionV1_4 transform = factory.getTargetVersionV1_4();
JsonNode newScenarioAsJson = transform.applyAll(oldScenarioAsJson);
pathMustNotExist(newScenarioAsJson, oldJsonPath);
......@@ -43,7 +43,7 @@ public class TargetVersionV1_4Test extends JsonTransformationTest {
pathMustExist(oldScenarioAsJson, oldJsonPath);
pathMustNotExist(oldScenarioAsJson, newJsonPath);
TargetVersionV1_4 transform = factory.getJsonTransformationV1_3ToV1_4();
TargetVersionV1_4 transform = factory.getTargetVersionV1_4();
JsonNode newScenarioAsJson = transform.applyAll(oldScenarioAsJson);
pathMustNotExist(newScenarioAsJson, oldJsonPath);
......@@ -61,7 +61,7 @@ public class TargetVersionV1_4Test extends JsonTransformationTest {
pathMustExist(oldScenarioAsJson, oldJsonPath);
pathMustNotExist(oldScenarioAsJson, newJsonPath);
TargetVersionV1_4 transform = factory.getJsonTransformationV1_3ToV1_4();
TargetVersionV1_4 transform = factory.getTargetVersionV1_4();
JsonNode newScenarioAsJson = transform.applyAll(oldScenarioAsJson);
pathMustNotExist(newScenarioAsJson, oldJsonPath);
......@@ -86,7 +86,7 @@ public class TargetVersionV1_4Test extends JsonTransformationTest {
}
}
TargetVersionV1_4 transform = factory.getJsonTransformationV1_3ToV1_4();
TargetVersionV1_4 transform = factory.getTargetVersionV1_4();
JsonNode newScenarioAsJson = transform.applyAll(oldScenarioAsJson);
// Assert that "attributes" node in "dynamicElements" is renamed here.
......
......@@ -38,7 +38,7 @@ public class V07ToV08Test extends JsonTransformationTest {
String jsonStr = getTestFileAsString("typ1.scenario");
JsonNode jsonOld = getJsonFromString(jsonStr);
JsonNode jsonNew = getJsonFromString(jsonStr);
TargetVersionV0_8 transformation = factory.getJsonTransformV7ToV8();
TargetVersionV0_8 transformation = factory.getTargetVersionV0_8();
jsonNew = transformation.applyMeasurementAreaType1(jsonNew);
for (String type : processorTypes) {
......@@ -66,7 +66,7 @@ public class V07ToV08Test extends JsonTransformationTest {
String jsonStr = getTestFileAsString("typ2.scenario");
JsonNode jsonOld = getJsonFromString(jsonStr);
JsonNode jsonNew = getJsonFromString(jsonStr);
TargetVersionV0_8 transformation = factory.getJsonTransformV7ToV8();
TargetVersionV0_8 transformation = factory.getTargetVersionV0_8();
jsonNew = transformation.applyMeasurementAreaType2(jsonNew);
for (String type : processorTypes) {
......@@ -99,7 +99,7 @@ public class V07ToV08Test extends JsonTransformationTest {
String jsonStr = getTestFileAsString("typ4.scenario");
JsonNode jsonOld = getJsonFromString(jsonStr);
JsonNode jsonNew = getJsonFromString(jsonStr);
TargetVersionV0_8 transformation = factory.getJsonTransformV7ToV8();
TargetVersionV0_8 transformation = factory.getTargetVersionV0_8();
jsonNew = transformation.applyMeasurementAreaType4(jsonNew);
for (String type : processorTypes) {
......@@ -126,7 +126,7 @@ public class V07ToV08Test extends JsonTransformationTest {
String jsonStr = getTestFileAsString("typ4.scenario");
JsonNode jsonOld = getJsonFromString(jsonStr);
JsonNode jsonNew = getJsonFromString(jsonStr);
TargetVersionV0_8 transformation = factory.getJsonTransformV7ToV8();
TargetVersionV0_8 transformation = factory.getTargetVersionV0_8();
jsonNew = transformation.applyMeasurementAreaType5(jsonNew);
for (String type : processorTypes) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment