-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
handle complexity endpoint for filter (#81)
return the size of identifiables for a list of filters Signed-off-by: Ghazwa REHILI <[email protected]>
- Loading branch information
1 parent
6ddd2ab
commit d108519
Showing
5 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/test/java/org/gridsuite/filter/server/utils/TestUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* Copyright (c) 2022, RTE (http://www.rte-france.com) | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
package org.gridsuite.filter.server.utils; | ||
|
||
import com.google.common.io.ByteStreams; | ||
import org.junit.platform.commons.util.StringUtils; | ||
|
||
import java.io.IOException; | ||
import java.nio.charset.StandardCharsets; | ||
|
||
/** | ||
* @author Rehili Ghazoua <[email protected]> | ||
*/ | ||
public final class TestUtils { | ||
|
||
private static final long TIMEOUT = 100; | ||
|
||
private TestUtils() { | ||
} | ||
|
||
public static String resourceToString(String resource) throws IOException { | ||
String content = new String(ByteStreams.toByteArray(TestUtils.class.getResourceAsStream(resource)), StandardCharsets.UTF_8); | ||
return StringUtils.replaceWhitespaceCharacters(content, ""); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"0": [ | ||
"c88c9510-15b4-468d-89c3-c1c6277966c3" | ||
], | ||
"1": [ | ||
"1110b06b-9b81-4d31-ac21-450628cd34ff" | ||
], | ||
"2": [ | ||
"f631034b-ba7c-4bb8-9d61-258a871e9265" | ||
], | ||
"3": [ | ||
"77614d91-c168-4f89-8fb9-77a23729e88e" | ||
] | ||
} |