From da146f8c9996c6844202adf756eb5e0f9939cca3 Mon Sep 17 00:00:00 2001 From: fayder Date: Sat, 29 Mar 2014 15:52:51 +0200 Subject: [PATCH] land-borders enabled --- .../restcountries/v1/domain/Country.java | 2 -- .../restcountries/v1/CountryRestTest.java | 32 ++++++++++--------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/main/java/vaeke/restcountries/v1/domain/Country.java b/src/main/java/vaeke/restcountries/v1/domain/Country.java index 9ac92c99..075a3f3c 100644 --- a/src/main/java/vaeke/restcountries/v1/domain/Country.java +++ b/src/main/java/vaeke/restcountries/v1/domain/Country.java @@ -5,7 +5,6 @@ import java.util.List; -import org.codehaus.jackson.annotate.JsonIgnore; import org.codehaus.jackson.annotate.JsonProperty; public class Country { @@ -54,7 +53,6 @@ public class Country { private List timezones; - @JsonIgnore private List borders; public String getName() { diff --git a/src/test/java/vaeke/restcountries/v1/CountryRestTest.java b/src/test/java/vaeke/restcountries/v1/CountryRestTest.java index 3f3fcd0a..b5e7ca18 100644 --- a/src/test/java/vaeke/restcountries/v1/CountryRestTest.java +++ b/src/test/java/vaeke/restcountries/v1/CountryRestTest.java @@ -5,6 +5,8 @@ import java.lang.reflect.Type; import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; import java.util.List; import org.junit.Rule; @@ -123,21 +125,21 @@ public void name() { } -// @HttpTest(method = Method.GET, path = "/alpha/co") -// public void getBorders() { -// Assert.assertOk(response); -// DesCountry country = deserialize(response.getBody()); -// org.junit.Assert.assertFalse(country == null); -// List bordercountry = country.getBorders(); -// org.junit.Assert.assertTrue(bordercountry.size() == 5); -// Collection c = new HashSet(); -// c.add("BRA"); -// c.add("ECU"); -// c.add("PAN"); -// c.add("PER"); -// c.add("VEN"); -// org.junit.Assert.assertTrue(bordercountry.containsAll(c)); -// } + @HttpTest(method = Method.GET, path = "/alpha/co") + public void getBorders() { + Assert.assertOk(response); + DesCountry country = deserialize(response.getBody()); + org.junit.Assert.assertFalse(country == null); + List bordercountry = country.getBorders(); + org.junit.Assert.assertTrue(bordercountry.size() == 5); + Collection c = new HashSet(); + c.add("BRA"); + c.add("ECU"); + c.add("PAN"); + c.add("PER"); + c.add("VEN"); + org.junit.Assert.assertTrue(bordercountry.containsAll(c)); + } private DesCountry deserialize(String json) { Gson gson = new Gson();