Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
V
vadere
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
110
Issues
110
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
3
Merge Requests
3
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vadere
vadere
Commits
b6724197
Commit
b6724197
authored
Nov 01, 2019
by
Benedikt Kleinmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed JSON transformation unit tests after renaming the transformations
parent
e218e7b1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
VadereSimulator/tests/org/vadere/simulator/projects/migration/jsontranformation/json/TargetVersionV1_2Test.java
...gration/jsontranformation/json/TargetVersionV1_2Test.java
+2
-2
VadereSimulator/tests/org/vadere/simulator/projects/migration/jsontranformation/json/TargetVersionV1_4Test.java
...gration/jsontranformation/json/TargetVersionV1_4Test.java
+4
-4
VadereSimulator/tests/org/vadere/simulator/projects/migration/jsontranformation/json/V07ToV08Test.java
...ojects/migration/jsontranformation/json/V07ToV08Test.java
+4
-4
No files found.
VadereSimulator/tests/org/vadere/simulator/projects/migration/jsontranformation/json/TargetVersionV1_2Test.java
View file @
b6724197
...
...
@@ -27,7 +27,7 @@ public class TargetVersionV1_2Test extends JsonTransformationTest {
assertThat
(
typeOld
,
equalTo
(
"CSV_CACHE"
));
TargetVersionV1_2
transform
=
factory
.
get
JsonTransformationV1_1To
V1_2
();
TargetVersionV1_2
transform
=
factory
.
get
TargetVersion
V1_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
.
get
JsonTransformationV1_1To
V1_2
();
TargetVersionV1_2
transform
=
factory
.
get
TargetVersion
V1_2
();
JsonNode
jsonNew
=
transform
.
applyAll
(
old
);
String
typeNew
=
pathMustExist
(
jsonNew
,
"scenario/attributesModel/org.vadere.state.attributes.models.AttributesFloorField/cacheType"
).
asText
();
...
...
VadereSimulator/tests/org/vadere/simulator/projects/migration/jsontranformation/json/TargetVersionV1_4Test.java
View file @
b6724197
...
...
@@ -25,7 +25,7 @@ public class TargetVersionV1_4Test extends JsonTransformationTest {
pathMustExist
(
oldScenarioAsJson
,
oldJsonPath
);
pathMustNotExist
(
oldScenarioAsJson
,
newJsonPath
);
TargetVersionV1_4
transform
=
factory
.
get
JsonTransformationV1_3To
V1_4
();
TargetVersionV1_4
transform
=
factory
.
get
TargetVersion
V1_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
.
get
JsonTransformationV1_3To
V1_4
();
TargetVersionV1_4
transform
=
factory
.
get
TargetVersion
V1_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
.
get
JsonTransformationV1_3To
V1_4
();
TargetVersionV1_4
transform
=
factory
.
get
TargetVersion
V1_4
();
JsonNode
newScenarioAsJson
=
transform
.
applyAll
(
oldScenarioAsJson
);
pathMustNotExist
(
newScenarioAsJson
,
oldJsonPath
);
...
...
@@ -86,7 +86,7 @@ public class TargetVersionV1_4Test extends JsonTransformationTest {
}
}
TargetVersionV1_4
transform
=
factory
.
get
JsonTransformationV1_3To
V1_4
();
TargetVersionV1_4
transform
=
factory
.
get
TargetVersion
V1_4
();
JsonNode
newScenarioAsJson
=
transform
.
applyAll
(
oldScenarioAsJson
);
// Assert that "attributes" node in "dynamicElements" is renamed here.
...
...
VadereSimulator/tests/org/vadere/simulator/projects/migration/jsontranformation/json/V07ToV08Test.java
View file @
b6724197
...
...
@@ -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
.
get
JsonTransformV7ToV
8
();
TargetVersionV0_8
transformation
=
factory
.
get
TargetVersionV0_
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
.
get
JsonTransformV7ToV
8
();
TargetVersionV0_8
transformation
=
factory
.
get
TargetVersionV0_
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
.
get
JsonTransformV7ToV
8
();
TargetVersionV0_8
transformation
=
factory
.
get
TargetVersionV0_
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
.
get
JsonTransformV7ToV
8
();
TargetVersionV0_8
transformation
=
factory
.
get
TargetVersionV0_
8
();
jsonNew
=
transformation
.
applyMeasurementAreaType5
(
jsonNew
);
for
(
String
type
:
processorTypes
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment