From 4fd807886c8638650f994051a8ca553021fe944d Mon Sep 17 00:00:00 2001 From: Hoan Nguyen Date: Wed, 31 Jul 2024 11:28:43 +0700 Subject: [PATCH] Fix json mock not found --- .../connector/uipath/test/UiPathMock.java | 7 ++++++ .../connector/uipath/test/json/folders.json | 22 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 ui-path-connector-test/src/com/axonivy/connector/uipath/test/json/folders.json diff --git a/ui-path-connector-test/src/com/axonivy/connector/uipath/test/UiPathMock.java b/ui-path-connector-test/src/com/axonivy/connector/uipath/test/UiPathMock.java index b1d6300..c040d19 100644 --- a/ui-path-connector-test/src/com/axonivy/connector/uipath/test/UiPathMock.java +++ b/ui-path-connector-test/src/com/axonivy/connector/uipath/test/UiPathMock.java @@ -53,6 +53,13 @@ public String getJobs() { "PersistenceId\": \"string\",", "PersistenceId\": \"" + UUID.randomUUID().toString() + "\","); return json; } + + @GET + @Produces(MediaType.APPLICATION_JSON) + @Path("odata/Folders") + public String getFolders() { + return load("json/folders.json"); + } @GET @Produces(MediaType.APPLICATION_JSON) diff --git a/ui-path-connector-test/src/com/axonivy/connector/uipath/test/json/folders.json b/ui-path-connector-test/src/com/axonivy/connector/uipath/test/json/folders.json new file mode 100644 index 0000000..c67f003 --- /dev/null +++ b/ui-path-connector-test/src/com/axonivy/connector/uipath/test/json/folders.json @@ -0,0 +1,22 @@ +{ + "@odata.context": "https://platform.uipath.com/odata/$metadata#Folders", + "@odata.count": 1, + "value": [ + { + "Key": "1a374a79-9bdd-4055-a0cc-95488ae006a0", + "DisplayName": "MyTest", + "FullyQualifiedName": "MyTest", + "FullyQualifiedNameOrderable": "MyTest", + "Description": null, + "FolderType": "Standard", + "ProvisionType": "Automatic", + "PermissionModel": "FineGrained", + "ParentId": null, + "ParentKey": null, + "IsActive": true, + "FeedType": "Processes", + "ReservedOptions": null, + "Id": 89973 + } + ] +}