From 1f398fe6b82622b9d60e0dcfa63863f7e618e756 Mon Sep 17 00:00:00 2001 From: Cody Lerum Date: Mon, 20 Dec 2021 14:32:52 -0700 Subject: [PATCH 1/2] add test to ensure user agent has been resolved --- .../java/com/hellosign/sdk/HelloSignClientTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/java/com/hellosign/sdk/HelloSignClientTest.java b/src/test/java/com/hellosign/sdk/HelloSignClientTest.java index d628562b..7aff7c6c 100644 --- a/src/test/java/com/hellosign/sdk/HelloSignClientTest.java +++ b/src/test/java/com/hellosign/sdk/HelloSignClientTest.java @@ -1,5 +1,6 @@ package com.hellosign.sdk; +import com.hellosign.sdk.http.AbstractHttpRequest; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotEquals; @@ -1199,4 +1200,13 @@ public void testRemoveSignatureRequestAccess() throws Exception { mockResponseCode(200); assertTrue(client.removeSignatureRequestAccess("44cf71a0238811c846f49483014f534cfd8caba6")); } + + /** + * Test to verify that the user agent has been resolved + */ + @Test + public void userAgent() { + final String userAgent = AbstractHttpRequest.USER_AGENT; + assertTrue(String.format("User Agent was %s", userAgent), !userAgent.contains("project.version")); + } } From a04735a74834f9856c5d1524313f7bf1459e4538 Mon Sep 17 00:00:00 2001 From: Cody Lerum Date: Mon, 20 Dec 2021 14:49:22 -0700 Subject: [PATCH 2/2] try to fix --- build.gradle | 4 ++++ src/test/java/com/hellosign/sdk/HelloSignClientTest.java | 1 + 2 files changed, 5 insertions(+) diff --git a/build.gradle b/build.gradle index 9246d1c5..6cfc2423 100644 --- a/build.gradle +++ b/build.gradle @@ -17,6 +17,10 @@ task sourcesJar(type: Jar) { from sourceSets.main.allSource } +processResources { + expand(project.properties) +} + artifacts { archives javadocJar, sourcesJar } diff --git a/src/test/java/com/hellosign/sdk/HelloSignClientTest.java b/src/test/java/com/hellosign/sdk/HelloSignClientTest.java index 7aff7c6c..bde5c8b8 100644 --- a/src/test/java/com/hellosign/sdk/HelloSignClientTest.java +++ b/src/test/java/com/hellosign/sdk/HelloSignClientTest.java @@ -1207,6 +1207,7 @@ public void testRemoveSignatureRequestAccess() throws Exception { @Test public void userAgent() { final String userAgent = AbstractHttpRequest.USER_AGENT; + System.out.println("User Agent: " + userAgent); assertTrue(String.format("User Agent was %s", userAgent), !userAgent.contains("project.version")); } }