From 7fb358c8428cc46edb15b7d819b421d5d601a95c Mon Sep 17 00:00:00 2001 From: Philippe Date: Fri, 9 Feb 2024 10:29:48 +0100 Subject: [PATCH 1/3] Added uri property --- .../java/com/bynder/sdk/query/UsageQuery.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main/java/com/bynder/sdk/query/UsageQuery.java b/src/main/java/com/bynder/sdk/query/UsageQuery.java index 8a77a92f..dddb3994 100644 --- a/src/main/java/com/bynder/sdk/query/UsageQuery.java +++ b/src/main/java/com/bynder/sdk/query/UsageQuery.java @@ -19,6 +19,12 @@ public class UsageQuery { @ApiField(name = "asset_id") private String assetId; + /** + * Uri of the asset + */ + @ApiField(name = "uri") + private String uri; + public String getAssetId() { return assetId; } @@ -27,4 +33,13 @@ public UsageQuery setAssetId(final String assetId) { this.assetId = assetId; return this; } + + public String getUri() { + return uri; + } + + public UsageQuery setUri(final String uri) { + this.uri = uri; + return this; + } } From 6c9b3b3ed6967b4a28e439236049003c3b9d2ca2 Mon Sep 17 00:00:00 2001 From: Philippe Date: Sat, 10 Feb 2024 11:41:07 +0100 Subject: [PATCH 2/3] Added unit test --- src/test/java/com/bynder/sdk/query/UsageQueryTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/test/java/com/bynder/sdk/query/UsageQueryTest.java b/src/test/java/com/bynder/sdk/query/UsageQueryTest.java index e08efe46..ef1171ad 100644 --- a/src/test/java/com/bynder/sdk/query/UsageQueryTest.java +++ b/src/test/java/com/bynder/sdk/query/UsageQueryTest.java @@ -22,6 +22,7 @@ public class UsageQueryTest { public static final String EXPECTED_ASSET_ID = "assetId"; + public static final String EXPECTED_URI = "uri"; private UsageQuery usageQuery; @@ -40,4 +41,10 @@ public void setAssetIdForUsageQuery() { usageQuery.setAssetId(EXPECTED_ASSET_ID); assertEquals(EXPECTED_ASSET_ID, usageQuery.getAssetId()); } + + @Test + public void setUriForUsageQuery() { + usageQuery.setUri(EXPECTED_URI); + assertEquals(EXPECTED_URI, usageQuery.getUri()); + } } From 77ef6cbe2f61b9e65d04c18374e6dc3fc9e0c178 Mon Sep 17 00:00:00 2001 From: Philippe Date: Mon, 12 Feb 2024 10:18:49 +0100 Subject: [PATCH 3/3] Extended unit test --- src/test/java/com/bynder/sdk/query/UsageQueryTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/java/com/bynder/sdk/query/UsageQueryTest.java b/src/test/java/com/bynder/sdk/query/UsageQueryTest.java index ef1171ad..6806b66a 100644 --- a/src/test/java/com/bynder/sdk/query/UsageQueryTest.java +++ b/src/test/java/com/bynder/sdk/query/UsageQueryTest.java @@ -34,6 +34,7 @@ public void setUp() { @Test public void initializeEmptyUsageQuery() { assertNull(usageQuery.getAssetId()); + assertNull(usageQuery.getUri()); } @Test