Skip to content

Commit

Permalink
added test for #125
Browse files Browse the repository at this point in the history
  • Loading branch information
fehguy committed Jul 30, 2016
1 parent fab122b commit 64a369e
Showing 1 changed file with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -149,4 +147,15 @@ public void verifyGetMapResponse() throws Exception {
String str = client.invokeAPI("/mockResponses/primitiaveMapResponse", "GET", queryParams, null, new HashMap<String, String>(), 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<String, String> queryParams = new HashMap<String, String>();

String str = client.invokeAPI("/issue-125", "GET", queryParams, null, new HashMap<String, String>(), null, "application/json", null, new String[0]);
assertEquals(str, "0");
}
}

0 comments on commit 64a369e

Please sign in to comment.