Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit a1c1a22

Browse files
SORMAS-Foundation#3649 update test swagger.json
1 parent c604f47 commit a1c1a22

2 files changed

Lines changed: 1108 additions & 949 deletions

File tree

sormas-rest/src/test/java/de/symeda/sormas/rest/ExternalVisitsResourceTest.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,7 @@ public void testIfRelevantSwaggerDocumentationIsUnchanged() throws IOException {
7878
* Visits Controller). This includes parameter names for that path, but not information about related enums.
7979
*/
8080
private static void extractPathsOfController(Map<String, Object> level1, String controller, Map resultMap) {
81-
level1.entrySet().forEach(e1 -> {
82-
String key1 = e1.getKey();
83-
Object value1 = e1.getValue();
81+
level1.forEach((key1, value1) -> {
8482
if (isInnerNode(value1)) {
8583
Map<String, Object> level2 = innerNode(value1);
8684
if (hasTag(level2, controller)) {
@@ -98,9 +96,7 @@ private static boolean hasTag(Map<String, Object> level2, String controller) {
9896
.map(ExternalVisitsResourceTest::innerNode)
9997
// tags are always represented in the third layer and as ArrayLists
10098
.map(ExternalVisitsResourceTest::tags)
101-
.filter(t -> t.contains(controller))
102-
.findFirst()
103-
.isPresent();
99+
.anyMatch(t -> t.contains(controller));
104100
}
105101

106102
@SuppressWarnings("unchecked")
@@ -126,9 +122,8 @@ private static List<Object> tags(Map<String, Object> innerNode) {
126122
* added to the list.
127123
*/
128124
private static void extractDetail(Map<String, Object> level1, String detailName, Map resultMap) {
129-
level1.entrySet().stream().forEach(e1 -> {
130-
Object value1 = e1.getValue();
131-
if (detailName.equals(e1.getKey())) {
125+
level1.forEach((key, value1) -> {
126+
if (detailName.equals(key)) {
132127
resultMap.put(detailName, value1);
133128
} else if (isInnerNode(value1)) {
134129
extractDetail(innerNode(value1), detailName, resultMap);

0 commit comments

Comments
 (0)