File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 55
66import com .onfido .ApiClient .Region ;
77import com .onfido .api .DefaultApi ;
8+ import java .net .InetSocketAddress ;
9+ import java .net .Proxy ;
810import java .util .UUID ;
911import org .junit .jupiter .api .Assertions ;
1012import org .junit .jupiter .api .BeforeEach ;
@@ -73,4 +75,12 @@ public void usesCARegionApiUrl() {
7375
7476 Assertions .assertEquals ("https://api.ca.onfido.com/v3.6" , url );
7577 }
78+
79+ @ Test ()
80+ public void usesProxy () {
81+ Proxy proxy = new Proxy (Proxy .Type .HTTP , new InetSocketAddress ("localhost" , 3128 ));
82+ DefaultApi onfido = new DefaultApi (apiClient .setApiToken ("token" ).setProxy (proxy ));
83+
84+ Assertions .assertEquals (proxy , onfido .getApiClient ().getProxy ());
85+ }
7686}
Original file line number Diff line number Diff line change 1+ package com .onfido .integration ;
2+
3+ import org .junit .jupiter .api .Assertions ;
4+ import org .junit .jupiter .api .Test ;
5+
6+ public class PingTest extends TestBase {
7+
8+ @ Test
9+ public void pingTest () throws Exception {
10+ String response = onfido .ping ();
11+
12+ Assertions .assertEquals ("OK" , response );
13+ }
14+ }
You can’t perform that action at this time.
0 commit comments