cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-7386] Trying a cheaper option
Date Fri, 26 May 2017 16:52:24 GMT
Repository: cxf
Updated Branches:
  refs/heads/master e3b77cc71 -> 8dbc8cbfa


[CXF-7386] Trying a cheaper option


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/8dbc8cbf
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/8dbc8cbf
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/8dbc8cbf

Branch: refs/heads/master
Commit: 8dbc8cbfa532706ec138c3580543d38ee5c34daf
Parents: e3b77cc
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Fri May 26 17:52:10 2017 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Fri May 26 17:52:10 2017 +0100

----------------------------------------------------------------------
 .../AbstractSwaggerServiceDescriptionTest.java  | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/8dbc8cbf/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwaggerServiceDescriptionTest.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwaggerServiceDescriptionTest.java
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwaggerServiceDescriptionTest.java
index 203d977..ee33d63 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwaggerServiceDescriptionTest.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwaggerServiceDescriptionTest.java
@@ -193,7 +193,7 @@ public abstract class AbstractSwaggerServiceDescriptionTest extends AbstractBusC
             final Response r = client.get();
             assertEquals(Status.OK.getStatusCode(), r.getStatus());
             
-            JsonObject expected = Json.createObjectBuilder()
+            JsonObject expected1 = Json.createObjectBuilder()
                 .add("apiVersion", "1.0.0")
                 .add("swaggerVersion", "1.2")
                 .add("basePath", "http://localhost:" + getPort() + "/")
@@ -209,8 +209,24 @@ public abstract class AbstractSwaggerServiceDescriptionTest extends AbstractBusC
                         .add("operations", Json.createArrayBuilder().add(GET_METHOD_SPEC))))
                 .add("models", BOOK_MODEL_SPEC).build();
             
+            JsonObject expected2 = Json.createObjectBuilder()
+                .add("apiVersion", "1.0.0")
+                .add("swaggerVersion", "1.2")
+                .add("basePath", "http://localhost:" + getPort() + "/")
+                .add("resourcePath", "/bookstore")
+                .add("apis", Json.createArrayBuilder()
+                    .add(Json.createObjectBuilder()
+                        .add("path", "/bookstore/{id}")
+                        .add("operations", Json.createArrayBuilder()
+                            .add(DELETE_METHOD_SPEC)
+                            .add(GET_BY_ID_METHOD_SPEC)))
+                    .add(Json.createObjectBuilder()
+                        .add("path", "/bookstore")
+                        .add("operations", Json.createArrayBuilder().add(GET_METHOD_SPEC))))
+                .add("models", BOOK_MODEL_SPEC).build();
+            
             JsonObject received = Json.createReader((InputStream)r.getEntity()).readObject();
-            assertEquals(expected, received);
+            assertTrue(expected1.equals(received) || expected2.equals(received));
 
         } finally {
             client.close();


Mime
View raw message