-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1104 from DenverCoder544/junit_5_upgrade
Junit 5 upgrade
- Loading branch information
Showing
195 changed files
with
3,252 additions
and
3,367 deletions.
There are no files selected for viewing
15 changes: 7 additions & 8 deletions
15
content-resources/src/test/java/org/oskari/helpers/AppSetupHelperTest.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 |
---|---|---|
@@ -1,28 +1,27 @@ | ||
package org.oskari.helpers; | ||
|
||
import org.json.JSONObject; | ||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.*; | ||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class AppSetupHelperTest { | ||
|
||
@Test | ||
public void readViewFile() throws Exception { | ||
// direct from root as the new way with no expectation | ||
assertEquals("root", AppSetupHelper.readViewFile("/test.json").optString("name")); | ||
assertEquals("apps", AppSetupHelper.readViewFile("/json/apps/custom/appsetup.json").optString("name")); | ||
Assertions.assertEquals("root", AppSetupHelper.readViewFile("/test.json").optString("name")); | ||
Assertions.assertEquals("apps", AppSetupHelper.readViewFile("/json/apps/custom/appsetup.json").optString("name")); | ||
|
||
// new "assumed path" /json/apps (should return the same custom apps as direct path to /json/apps) | ||
JSONObject apps = AppSetupHelper.readViewFile("custom/appsetup.json"); | ||
assertEquals("apps", apps.optString("name")); | ||
Assertions.assertEquals("apps", apps.optString("name")); | ||
|
||
// for older "assumed path" /json/views | ||
JSONObject views = AppSetupHelper.readViewFile("appsetup.json"); | ||
assertEquals("views", views.optString("name")); | ||
Assertions.assertEquals("views", views.optString("name")); | ||
|
||
// Because the search path only has test.json at root | ||
assertEquals("root", AppSetupHelper.readViewFile("test.json").optString("name")); | ||
Assertions.assertEquals("root", AppSetupHelper.readViewFile("test.json").optString("name")); | ||
|
||
} | ||
} |
11 changes: 5 additions & 6 deletions
11
content-resources/src/test/java/org/oskari/helpers/LayerHelperTest.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
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
28 changes: 13 additions & 15 deletions
28
control-admin/src/test/java/fi/nls/oskari/control/admin/LayerAdminHandlerTest.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
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
Oops, something went wrong.