Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
Merge branch 'dev' into servlet2
Browse files Browse the repository at this point in the history
  • Loading branch information
fayderflorez committed Mar 29, 2014
2 parents e38b1d5 + da146f8 commit c2b54a7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 0 additions & 2 deletions src/main/java/vaeke/restcountries/v1/domain/Country.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import java.util.List;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonProperty;

public class Country {
Expand Down Expand Up @@ -54,7 +53,6 @@ public class Country {

private List<String> timezones;

@JsonIgnore
private List<String> borders;

public String getName() {
Expand Down
32 changes: 17 additions & 15 deletions src/test/java/vaeke/restcountries/v1/CountryRestTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<String> bordercountry = country.getBorders();
// org.junit.Assert.assertTrue(bordercountry.size() == 5);
// Collection<String> c = new HashSet<String>();
// 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<String> bordercountry = country.getBorders();
org.junit.Assert.assertTrue(bordercountry.size() == 5);
Collection<String> c = new HashSet<String>();
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();
Expand Down

0 comments on commit c2b54a7

Please sign in to comment.