From 64a369e6c489c4389307693c487381239c37a482 Mon Sep 17 00:00:00 2001 From: Tony Tam Date: Sat, 30 Jul 2016 10:13:24 -0700 Subject: [PATCH] added test for #125 --- .../responses/PrimitiveResponseTestIT.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/test/java/io/swagger/test/integration/responses/PrimitiveResponseTestIT.java b/src/test/java/io/swagger/test/integration/responses/PrimitiveResponseTestIT.java index db68fda5..e47e9315 100644 --- a/src/test/java/io/swagger/test/integration/responses/PrimitiveResponseTestIT.java +++ b/src/test/java/io/swagger/test/integration/responses/PrimitiveResponseTestIT.java @@ -18,12 +18,10 @@ import io.swagger.test.client.ApiClient; -import org.testng.annotations.Test; - import java.util.HashMap; import java.util.Map; -import static org.testng.Assert.*; +import static org.testng.Assert.assertEquals; public class PrimitiveResponseTestIT { ApiClient client = new ApiClient(); @@ -149,4 +147,15 @@ public void verifyGetMapResponse() throws Exception { String str = client.invokeAPI("/mockResponses/primitiaveMapResponse", "GET", queryParams, null, new HashMap(), null, "application/json", null, new String[0]); assertEquals(str, "{\"key\":\"key\",\"value\":\"string\"}"); } + + /** + * verifies that the email return value is automatically created + */ + @org.junit.Test + public void verifyBaseIntegerResponse() throws Exception { + Map queryParams = new HashMap(); + + String str = client.invokeAPI("/issue-125", "GET", queryParams, null, new HashMap(), null, "application/json", null, new String[0]); + assertEquals(str, "0"); + } }