From d19f5700c31e93c7d5ef78b2c5dccb1f2c52b417 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Tue, 20 Jul 2010 15:46:03 +0000 Subject: [PATCH] [Tests] adapt java unit tests to new semantic for list fields GList fields now return an empty list, not null. --- bindings/java/tests/BindingTests.java | 12 ++++++------ 1 file 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 = "\n" + " do 1\n" + ""; String actionString2 = "\n" + " do 2\n" + ""; @@ -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; }