diff options
author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-07-20 15:46:03 +0000 |
---|---|---|
committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-07-20 15:46:03 +0000 |
commit | d19f5700c31e93c7d5ef78b2c5dccb1f2c52b417 (patch) | |
tree | b4f450ce25d9d541b48f660e5a7d83355a1ff04e /bindings/java | |
parent | aebd6ed3d73da56409593b4d500748959d8c1cea (diff) | |
download | lasso-d19f5700c31e93c7d5ef78b2c5dccb1f2c52b417.tar.gz lasso-d19f5700c31e93c7d5ef78b2c5dccb1f2c52b417.tar.xz lasso-d19f5700c31e93c7d5ef78b2c5dccb1f2c52b417.zip |
[Tests] adapt java unit tests to new semantic for list fields
GList fields now return an empty list, not null.
Diffstat (limited to 'bindings/java')
-rw-r--r-- | bindings/java/tests/BindingTests.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bindings/java/tests/BindingTests.java b/bindings/java/tests/BindingTests.java index a6b57830..6cc9bd46 100644 --- a/bindings/java/tests/BindingTests.java +++ b/bindings/java/tests/BindingTests.java @@ -81,7 +81,7 @@ public class BindingTests extends TestCase { LibAuthnRequest authnRequest = new LibAuthnRequest(); - assertNull(authnRequest.getRespondWith()); + assertTrue(authnRequest.getRespondWith().isEmpty()); List respondWith = new ArrayList(); assertEquals(respondWith.size(), 0); @@ -125,7 +125,7 @@ public class BindingTests extends TestCase { assertEquals(authnRequest.getRespondWith().get(1), "third string"); assertEquals(authnRequest.getRespondWith().get(2), "second string"); authnRequest.setRespondWith(null); - assertNull(authnRequest.getRespondWith()); + assertTrue(authnRequest.getRespondWith().isEmpty()); authnRequest = null; } @@ -135,7 +135,7 @@ public class BindingTests extends TestCase { SamlpResponse response = new SamlpResponse(); - assertNull(response.getAssertion()); + assertTrue(response.getAssertion().isEmpty()); List assertions = new ArrayList(); assertEquals(assertions.size(), 0); @@ -178,7 +178,7 @@ public class BindingTests extends TestCase { assertEquals(((SamlAssertion) response.getAssertion().get(1)).getAssertionId(), "assertion 2"); assertEquals(((SamlAssertion) response.getAssertion().get(2)).getAssertionId(), "assertion 3"); response.setAssertion(null); - assertNull(response.getAssertion()); + assertTrue(response.getAssertion().isEmpty()); response = null; } @@ -188,7 +188,7 @@ public class BindingTests extends TestCase { LibAuthnRequest authnRequest = new LibAuthnRequest(); - assertNull(authnRequest.getExtension()); + assertTrue(authnRequest.getExtension().isEmpty()); String actionString1 = "<lib:Extension xmlns:lib=\"urn:liberty:iff:2003-08\">\n" + " <action>do 1</action>\n" + "</lib:Extension>"; String actionString2 = "<lib:Extension xmlns:lib=\"urn:liberty:iff:2003-08\">\n" + " <action>do 2</action>\n" + "</lib:Extension>"; @@ -228,7 +228,7 @@ public class BindingTests extends TestCase { assertEquals(authnRequest.getExtension().get(1), actionString2); assertEquals(authnRequest.getExtension().get(2), actionString3); authnRequest.setExtension(null); - assertNull(authnRequest.getExtension()); + assertTrue(authnRequest.getExtension().isEmpty()); authnRequest = null; } |