Skip to content
Snippets Groups Projects
Commit 04a99051 authored by Stefan E. Funk's avatar Stefan E. Funk
Browse files

Added some more tests, please use if needed.

parent 3e55c346
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,6 @@ import java.util.Map; ...@@ -26,7 +26,6 @@ import java.util.Map;
import javax.xml.ws.BindingProvider; import javax.xml.ws.BindingProvider;
import javax.xml.ws.soap.MTOMFeature; import javax.xml.ws.soap.MTOMFeature;
import javax.xml.ws.soap.SOAPBinding;
/******************************************************************************* /*******************************************************************************
* TODOLOG * TODOLOG
......
...@@ -18,11 +18,15 @@ ...@@ -18,11 +18,15 @@
package info.textgrid.middleware.tgauth.tgauthclient; package info.textgrid.middleware.tgauth.tgauthclient;
import static org.junit.Assert.assertTrue;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.net.URL; import java.net.URL;
import info.textgrid.namespaces.middleware.tgauth.BooleanResponse; import info.textgrid.namespaces.middleware.tgauth.BooleanResponse;
import info.textgrid.namespaces.middleware.tgauth.GetObjectsRequest;
import info.textgrid.namespaces.middleware.tgauth.PortTgextra; import info.textgrid.namespaces.middleware.tgauth.PortTgextra;
import info.textgrid.namespaces.middleware.tgauth.ResourcesetResponse;
import info.textgrid.namespaces.middleware.tgauth.TgCheckAccessRequest; import info.textgrid.namespaces.middleware.tgauth.TgCheckAccessRequest;
import info.textgrid.namespaces.middleware.tgauth.UnknownResourceFault; import info.textgrid.namespaces.middleware.tgauth.UnknownResourceFault;
...@@ -39,6 +43,7 @@ import org.junit.Test; ...@@ -39,6 +43,7 @@ import org.junit.Test;
******************************************************************************* *******************************************************************************
* CHANGELOG * CHANGELOG
* *
* 2016.08.05 Funk Added getObjects test.
* 2016-08-03 Funk Copied from TGAuthClientUtilities. * 2016-08-03 Funk Copied from TGAuthClientUtilities.
******************************************************************************/ ******************************************************************************/
...@@ -48,7 +53,7 @@ import org.junit.Test; ...@@ -48,7 +53,7 @@ import org.junit.Test;
* </p> * </p>
* *
* @author Stefan E. Funk, DUB Göttingen * @author Stefan E. Funk, DUB Göttingen
* @version 2016-08-04 * @version 2016-08-05
* @since 2016-08-04 * @since 2016-08-04
******************************************************************************/ ******************************************************************************/
...@@ -92,7 +97,7 @@ public final class TestTGAuthClientUtilities { ...@@ -92,7 +97,7 @@ public final class TestTGAuthClientUtilities {
*/ */
@Ignore @Ignore
@Test(expected = UnknownResourceFault.class) @Test(expected = UnknownResourceFault.class)
public void testGetTgextra() throws MalformedURLException, public void testGetTgextraCheckAccess() throws MalformedURLException,
UnknownResourceFault { UnknownResourceFault {
URL endpoint = new URL("https://textgridlab.org/1.0/tgauth/tgextra.php"); URL endpoint = new URL("https://textgridlab.org/1.0/tgauth/tgextra.php");
...@@ -110,4 +115,35 @@ public final class TestTGAuthClientUtilities { ...@@ -110,4 +115,35 @@ public final class TestTGAuthClientUtilities {
System.out.println("checkAccess: " + response.isResult()); System.out.println("checkAccess: " + response.isResult());
} }
/**
* <p>
* Note: This is an online test, please enable if necessary!
* </p>
*
* @throws MalformedURLException
* @throws UnknownResourceFault
*/
@Ignore
@Test
public void testGetTgextraGetObjets() throws MalformedURLException,
UnknownResourceFault {
URL endpoint = new URL("https://textgridlab.org/1.0/tgauth/tgextra.php");
PortTgextra tgextra = TGAuthClientUtilities.getTgextra(endpoint);
GetObjectsRequest request = new GetObjectsRequest();
request.setAuth("");
request.setLog("");
request.setProject("TGPR-778e8193-0c1c-11ba-1b56-529dcde3e58d");
ResourcesetResponse response = tgextra.getObjects(request);
System.out.println("all objects: " + response.getResource());
if (response.getResource().isEmpty()) {
assertTrue(false);
}
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment