Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 048c17bab -> 8a1cd9a9f


[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/8a1cd9a9
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/8a1cd9a9
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/8a1cd9a9

Branch: refs/heads/3.1.x-fixes
Commit: 8a1cd9a9f818c7eba2cb9f8bfa9863600af1ad98
Parents: 048c17b
Author: Sergey Beryozkin <[email protected]>
Authored: Fri May 26 17:52:10 2017 +0100
Committer: Sergey Beryozkin <[email protected]>
Committed: Fri May 26 17:54:10 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/8a1cd9a9/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 de44151..958bc0a 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,25 @@ 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();
         }

Reply via email to