polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [23/50] [abbrv] zest-qi4j git commit: REST Library: fixed tests on IBM JDK
Date Fri, 17 Apr 2015 16:05:43 GMT
REST Library: fixed tests on IBM JDK


Project: http://git-wip-us.apache.org/repos/asf/zest-qi4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-qi4j/commit/7dc317b3
Tree: http://git-wip-us.apache.org/repos/asf/zest-qi4j/tree/7dc317b3
Diff: http://git-wip-us.apache.org/repos/asf/zest-qi4j/diff/7dc317b3

Branch: refs/heads/master
Commit: 7dc317b37f7720e0d77500b3db039d678c6eb1b5
Parents: 2d5b02b
Author: Paul Merlin <paul@nosphere.org>
Authored: Wed Feb 13 16:58:35 2013 +0100
Committer: Paul Merlin <paul@nosphere.org>
Committed: Wed Feb 13 16:58:35 2013 +0100

----------------------------------------------------------------------
 .../test/java/org/qi4j/library/rest/admin/RestTest.java   | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/7dc317b3/libraries/rest/src/test/java/org/qi4j/library/rest/admin/RestTest.java
----------------------------------------------------------------------
diff --git a/libraries/rest/src/test/java/org/qi4j/library/rest/admin/RestTest.java b/libraries/rest/src/test/java/org/qi4j/library/rest/admin/RestTest.java
index f797490..b85c22c 100644
--- a/libraries/rest/src/test/java/org/qi4j/library/rest/admin/RestTest.java
+++ b/libraries/rest/src/test/java/org/qi4j/library/rest/admin/RestTest.java
@@ -51,7 +51,6 @@ import static org.hamcrest.CoreMatchers.anyOf;
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.junit.Assert.*;
 
-//@Ignore( "Need to rebuild tests after larger changes to implementation." )
 public class RestTest
     extends AbstractQi4jTest
 {
@@ -119,11 +118,14 @@ public class RestTest
     public void givenAnIdentityWhenExecutingGetCommandThenExpectTheCorrectRdf()
         throws Exception
     {
-        //Thread.sleep( Long.MAX_VALUE );
         RestTester restTester = module.newObject( RestTester.class );
         String rdf = restTester.getEntity( "P1" );
-        //System.out.println( "#############\n" + rdf.replaceAll( "\n", "\\\\n" ).replaceAll(
"\"", "\\\\\"" ) );
-        assertEquals( "Incorrect RDF produced", "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rdf:RDF\n
xmlns:qi4j=\"http://www.qi4j.org/rdf/model/1.0/\"\n	xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n
xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n<org.qi4j.library.rest.admin.RestTest-PersonEntity
xmlns=\"urn:qi4j:type:\" rdf:about=\"urn:qi4j:entity:P1\">\n	<firstname xmlns=\"urn:qi4j:type:org.qi4j.library.rest.admin.RestTest-Person#\">Joe</firstname>\n
<lastname xmlns=\"urn:qi4j:type:org.qi4j.library.rest.admin.RestTest-Person#\">Doe</lastname>\n
<identity xmlns=\"urn:qi4j:type:org.qi4j.api.entity.Identity#\">P1</identity>\n
<mother xmlns=\"urn:qi4j:type:org.qi4j.library.rest.admin.RestTest-Person#\" rdf:resource=\"urn:qi4j:entity:P2\"/>\n</org.qi4j.library.rest.admin.RestTest-PersonEntity>\n\n</rdf:RDF>",
rdf );
+        // System.out.println( rdf.replaceAll( "\n", "\\\\n" ).replaceAll( "\"", "\\\\\""
) );
+        assertThat( "Incorrect RDF produced", rdf, anyOf(
+            // Sun/Oracle/Open JDK
+            equalTo( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rdf:RDF\n	xmlns:qi4j=\"http://www.qi4j.org/rdf/model/1.0/\"\n
xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n	xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n<org.qi4j.library.rest.admin.RestTest-PersonEntity
xmlns=\"urn:qi4j:type:\" rdf:about=\"urn:qi4j:entity:P1\">\n	<firstname xmlns=\"urn:qi4j:type:org.qi4j.library.rest.admin.RestTest-Person#\">Joe</firstname>\n
<lastname xmlns=\"urn:qi4j:type:org.qi4j.library.rest.admin.RestTest-Person#\">Doe</lastname>\n
<identity xmlns=\"urn:qi4j:type:org.qi4j.api.entity.Identity#\">P1</identity>\n
<mother xmlns=\"urn:qi4j:type:org.qi4j.library.rest.admin.RestTest-Person#\" rdf:resource=\"urn:qi4j:entity:P2\"/>\n</org.qi4j.library.rest.admin.RestTest-PersonEntity>\n\n</rdf:RDF>"
),
+            // IBM JDK
+            equalTo( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rdf:RDF\n	xmlns:qi4j=\"http://www.qi4j.org/rdf/model/1.0/\"\n
xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n	xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n<org.qi4j.library.rest.admin.RestTest-PersonEntity
xmlns=\"urn:qi4j:type:\" rdf:about=\"urn:qi4j:entity:P1\">\n	<identity xmlns=\"urn:qi4j:type:org.qi4j.api.entity.Identity#\">P1</identity>\n
<lastname xmlns=\"urn:qi4j:type:org.qi4j.library.rest.admin.RestTest-Person#\">Doe</lastname>\n
<firstname xmlns=\"urn:qi4j:type:org.qi4j.library.rest.admin.RestTest-Person#\">Joe</firstname>\n
<mother xmlns=\"urn:qi4j:type:org.qi4j.library.rest.admin.RestTest-Person#\" rdf:resource=\"urn:qi4j:entity:P2\"/>\n</org.qi4j.library.rest.admin.RestTest-PersonEntity>\n\n</rdf:RDF>"
) ) );
     }
 
     @Test


Mime
View raw message