cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Try to get test to pass
Date Tue, 01 Aug 2017 09:42:22 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes e985c12cd -> b1a3bcfd8


Try to get test to pass


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

Branch: refs/heads/3.1.x-fixes
Commit: b1a3bcfd804594d649b92582b74dc3d88e4c872b
Parents: e985c12
Author: Daniel Kulp <dkulp@apache.org>
Authored: Mon Jul 31 16:29:38 2017 -0400
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Tue Aug 1 12:33:18 2017 +0300

----------------------------------------------------------------------
 .../AbstractSwagger2ServiceDescriptionTest.java          | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/b1a3bcfd/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java
index 0d9b652..aaddb93 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/description/AbstractSwagger2ServiceDescriptionTest.java
@@ -129,26 +129,29 @@ public abstract class AbstractSwagger2ServiceDescriptionTest extends
AbstractBus
             assertNotNull(urs);
             assertEquals(1, urs.size());
             UserResource r = urs.get(0);
-            assertEquals("/bookstore", r.getPath());
+            String basePath = "";
+            if (!"/".equals(r.getPath())) {
+                basePath = r.getPath();
+            }
             Map<String, UserOperation> map = r.getOperationsAsMap();
             assertEquals(3, map.size());
             UserOperation getBooksOp = map.get("getBooks");
             assertEquals(HttpMethod.GET, getBooksOp.getVerb());
-            assertEquals("/", getBooksOp.getPath());
+            assertEquals("/bookstore", basePath + getBooksOp.getPath());
             assertEquals(MediaType.APPLICATION_JSON, getBooksOp.getProduces());
             List<Parameter> getBooksOpParams = getBooksOp.getParameters();
             assertEquals(1, getBooksOpParams.size());
             assertEquals(ParameterType.QUERY, getBooksOpParams.get(0).getType());
             UserOperation getBookOp = map.get("getBook");
             assertEquals(HttpMethod.GET, getBookOp.getVerb());
-            assertEquals("/{id}", getBookOp.getPath());
+            assertEquals("/bookstore/{id}", basePath + getBookOp.getPath());
             assertEquals(MediaType.APPLICATION_JSON, getBookOp.getProduces());
             List<Parameter> getBookOpParams = getBookOp.getParameters();
             assertEquals(1, getBookOpParams.size());
             assertEquals(ParameterType.PATH, getBookOpParams.get(0).getType());
             UserOperation deleteOp = map.get("delete");
             assertEquals(HttpMethod.DELETE, deleteOp.getVerb());
-            assertEquals("/{id}", deleteOp.getPath());
+            assertEquals("/bookstore/{id}", basePath + deleteOp.getPath());
             List<Parameter> delOpParams = deleteOp.getParameters();
             assertEquals(1, delOpParams.size());
             assertEquals(ParameterType.PATH, delOpParams.get(0).getType());


Mime
View raw message