From 617649d4d793f6834433e66709e5c9663b74568e Mon Sep 17 00:00:00 2001 From: fayder Date: Wed, 4 Dec 2013 16:27:05 +0200 Subject: [PATCH] minor changes --- src/main/webapp/index.html | 2 +- .../java/vaeke/countrydata/rest/CountryRestTest.java | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 1f58bdb5..1387055f 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -99,7 +99,7 @@

Country Code

Country Codes

diff --git a/src/test/java/vaeke/countrydata/rest/CountryRestTest.java b/src/test/java/vaeke/countrydata/rest/CountryRestTest.java index 55311ed6..f08bf7bb 100644 --- a/src/test/java/vaeke/countrydata/rest/CountryRestTest.java +++ b/src/test/java/vaeke/countrydata/rest/CountryRestTest.java @@ -107,6 +107,17 @@ public void alphaList() { org.junit.Assert.assertTrue(response.getBody().contains("\"alpha2Code\":\"IT\"")); } + @HttpTest(method = Method.GET, path = "/name/russia") + public void name() { + Assert.assertOk(response); + List countries = deserializeList(response.getBody()); + org.junit.Assert.assertFalse(countries.isEmpty()); + for(Country c : countries) { + org.junit.Assert.assertEquals("Russia", c.getName()); + } + + } + private List deserializeList(String json) { Gson gson = new Gson(); Type listType = new TypeToken>() {}.getType();