Commit 45b2a00b authored by jcechace's avatar jcechace
Browse files

Fixed empty params is tests -- again

parent 1f758827
Pipeline #62021 failed with stage
in 15 seconds
......@@ -14,7 +14,9 @@ import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
......@@ -70,19 +72,17 @@ public class ApplicationTest {
for (int i = 0; i < changes.length - 1; i += 2) {
params.put(changes[i], changes[i+1]);
}
String[] arrayParams = new String[params.size() * 2];
List<String> listParams = new ArrayList<>();
int i = 0;
for (Map.Entry<String, String> e : params.entrySet()) {
arrayParams[i] = e.getKey();
i++;
listParams.add(e.getKey());
String v = e.getValue();
if (v != null && !v.isEmpty()) {
arrayParams[i] = e.getValue();
i++;
listParams.add(e.getValue());
}
}
return arrayParams;
return listParams.toArray(new String[listParams.size()]);
}
public void assertOutput(ByteArrayOutputStream stream, SoftAssertions assertions, String content) {
......
Supports Markdown
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