-
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.
test[OrgAPIWrapper]: add tests for OrgAPIWrapper
- Loading branch information
Lucy Ciara Herud-Thomassen
authored and
Lucy Ciara Herud-Thomassen
committed
Mar 3, 2026
1 parent
a3752a2
commit fecaec9
Showing
4 changed files
with
37 additions
and
17 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,7 +47,6 @@ | |
| <scope>compile</scope> | ||
| </dependency> | ||
|
|
||
|
|
||
| </dependencies> | ||
|
|
||
| <build> | ||
|
|
||
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,15 +1,24 @@ | ||
| package edu.group5.app; | ||
|
|
||
| import java.util.HashMap; | ||
|
|
||
| import edu.group5.app.control.OrgAPIWrapper; | ||
| import tools.jackson.core.type.TypeReference; | ||
| import tools.jackson.databind.ObjectMapper; | ||
|
|
||
| /** | ||
| * Hello world! | ||
| */ | ||
| public class App { | ||
| public static void main(String[] args) { | ||
| public static void main(String[] args) throws InterruptedException { | ||
| OrgAPIWrapper orgWrap = new OrgAPIWrapper("https://app.innsamlingskontrollen.no/api/public/v1/all"); | ||
| System.out.println(); | ||
| System.out.println(); | ||
| orgWrap.importData(); | ||
| Object[] imports = orgWrap.getData(); | ||
| ObjectMapper objectMapper = new ObjectMapper(); | ||
| HashMap<String, Object> map = objectMapper.convertValue(imports[0], new TypeReference<HashMap<String, Object>>() { | ||
| }); | ||
| System.out.println(map.get("org_number")); | ||
| } | ||
| } |
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