You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2022/11/23 17:20:14 UTC
[juneau] branch master updated: Convert ThirdPartyProxyTest to mocked test.
This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new 16c7cb40b Convert ThirdPartyProxyTest to mocked test.
16c7cb40b is described below
commit 16c7cb40b25f360740cbcbd51776f85ee0276b39
Author: JamesBognar <ja...@salesforce.com>
AuthorDate: Wed Nov 23 12:19:04 2022 -0500
Convert ThirdPartyProxyTest to mocked test.
---
.../apache/juneau/rest/test/client/ThirdPartyProxyTest.java | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/juneau-microservice/juneau-microservice-ftest/src/test/java/org/apache/juneau/rest/test/client/ThirdPartyProxyTest.java b/juneau-microservice/juneau-microservice-ftest/src/test/java/org/apache/juneau/rest/test/client/ThirdPartyProxyTest.java
index 5c826ccbf..c4b1761e7 100644
--- a/juneau-microservice/juneau-microservice-ftest/src/test/java/org/apache/juneau/rest/test/client/ThirdPartyProxyTest.java
+++ b/juneau-microservice/juneau-microservice-ftest/src/test/java/org/apache/juneau/rest/test/client/ThirdPartyProxyTest.java
@@ -35,6 +35,7 @@ import org.apache.juneau.httppart.*;
import org.apache.juneau.json.*;
import org.apache.juneau.msgpack.*;
import org.apache.juneau.parser.*;
+import org.apache.juneau.rest.mock.*;
import org.apache.juneau.rest.test.*;
import org.apache.juneau.rest.test.client.ThirdPartyProxyTest.ThirdPartyProxy.*;
import org.apache.juneau.serializer.*;
@@ -48,7 +49,7 @@ import org.junit.runners.*;
@FixMethodOrder(NAME_ASCENDING)
@RunWith(Parameterized.class)
-public class ThirdPartyProxyTest extends RestTestcase {
+public class ThirdPartyProxyTest {
@Parameterized.Parameters
public static Collection<Object[]> getParameters() {
@@ -66,11 +67,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
private ThirdPartyProxy proxy;
public ThirdPartyProxyTest(String label, Serializer serializer, Parser parser) {
- proxy = getCached(label, ThirdPartyProxy.class);
- if (proxy == null) {
- proxy = TestMicroservice.client(serializer, parser).ignoreErrors().partSerializer(UonSerializer.create().addBeanTypes().addRootType().build()).build().getRemote(ThirdPartyProxy.class, null, serializer, parser);
- cache(label, proxy);
- }
+ proxy = MockRestClient.create(ThirdPartyProxyResource.class).ignoreErrors().serializer(serializer).parser(parser).partSerializer(UonSerializer.create().addBeanTypes().addRootType().build()).build().getRemote(ThirdPartyProxy.class, null, serializer, parser);
}
//-----------------------------------------------------------------------------------------------------------------
@@ -1522,7 +1519,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
// Proxy class
//-----------------------------------------------------------------------------------------------------------------
- @Remote(path="/testThirdPartyProxy")
+ @Remote
public static interface ThirdPartyProxy {
//-------------------------------------------------------------------------------------------------------------