-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from robmoffat/master
Fixing Enums and Proxies
- Loading branch information
Showing
14 changed files
with
328 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
bindings/src/test/java/com/symphony/api/bindings/TestProxyConnection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.symphony.api.bindings; | ||
|
||
import org.junit.Assert; | ||
import org.junit.experimental.theories.Theory; | ||
|
||
public class TestProxyConnection extends AbstractTest { | ||
|
||
@Theory | ||
public void testConnectionToRandomUrl(TestClientStrategy tcs) { | ||
ConfigurableApiBuilder b = tcs.getApiBuilder(); | ||
b.setProxyDetails(null, null, null, 8080); | ||
Assert.assertTrue(b.testConnection("https://google.com")); | ||
} | ||
|
||
@Theory | ||
public void testConnectionToSymphonyPod(TestClientStrategy tcs) { | ||
ConfigurableApiBuilder b = tcs.getApiBuilder(); | ||
b.setProxyDetails(null, null, null, 8080); | ||
Assert.assertTrue(b.testConnection(TestPodConfig.POD_URL)); | ||
} | ||
|
||
@Theory | ||
public void testConnectionToSymphonyRelay(TestClientStrategy tcs) { | ||
ConfigurableApiBuilder b = tcs.getApiBuilder(); | ||
b.setConnectTimeout(6000); | ||
b.setProxyDetails(null, null, null, 8080); | ||
Assert.assertTrue(b.testConnection(TestPodConfig.RELAY_URL)); | ||
} | ||
|
||
@Theory | ||
public void testConnectionToSomethingBroken(TestClientStrategy tcs) { | ||
ConfigurableApiBuilder b = tcs.getApiBuilder(); | ||
b.setProxyDetails(null, null, null, 8080); | ||
Assert.assertFalse(b.testConnection("https://idontexist.co.uk")); | ||
} | ||
|
||
@Theory | ||
public void testWithBrokenProxy(TestClientStrategy tcs) { | ||
ConfigurableApiBuilder b = tcs.getApiBuilder(); | ||
b.setProxyDetails("idontexist.co.uk", null, null, 8080); | ||
Assert.assertFalse(b.testConnection(TestPodConfig.POD_URL)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.