Correct iso_3166 to country not language

master
Stuart Boston 11 years ago
parent ebada5f008
commit 8e68dd6dde

@ -34,20 +34,20 @@ public class ProductionCountry extends AbstractJsonMapping {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@JsonProperty("iso_3166_1") @JsonProperty("iso_3166_1")
private String isoCode; private String country;
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public String getIsoCode() { public String getCountry() {
return isoCode; return country;
} }
public String getName() { public void setCountry(String country) {
return name; this.country = country;
} }
public void setIsoCode(String isoCode) { public String getName() {
this.isoCode = isoCode; return name;
} }
public void setName(String name) { public void setName(String name) {
@ -60,7 +60,7 @@ public class ProductionCountry extends AbstractJsonMapping {
final ProductionCountry other = (ProductionCountry) obj; final ProductionCountry other = (ProductionCountry) obj;
return new EqualsBuilder() return new EqualsBuilder()
.append(name, other.name) .append(name, other.name)
.append(isoCode, other.isoCode) .append(country, other.country)
.isEquals(); .isEquals();
} else { } else {
return false; return false;
@ -70,7 +70,7 @@ public class ProductionCountry extends AbstractJsonMapping {
@Override @Override
public int hashCode() { public int hashCode() {
return new HashCodeBuilder() return new HashCodeBuilder()
.append(isoCode) .append(country)
.append(name) .append(name)
.toHashCode(); .toHashCode();
} }

@ -28,16 +28,16 @@ import com.fasterxml.jackson.annotation.JsonProperty;
public class ContentRating { public class ContentRating {
@JsonProperty("iso_3166_1") @JsonProperty("iso_3166_1")
private String language; private String country;
@JsonProperty("rating") @JsonProperty("rating")
private String rating; private String rating;
public String getLanguage() { public String getCountry() {
return language; return country;
} }
public void setLanguage(String language) { public void setCountry(String country) {
this.language = language; this.country = country;
} }
public String getRating() { public String getRating() {

@ -170,7 +170,7 @@ public class TmdbTVTest extends AbstractTests {
for (TestID test : TV_IDS) { for (TestID test : TV_IDS) {
ResultList<ContentRating> result = instance.getTVContentRatings(test.getTmdb()); ResultList<ContentRating> result = instance.getTVContentRatings(test.getTmdb());
TestSuite.test(result, "TV Content Rating"); TestSuite.test(result, "TV Content Rating");
assertTrue("No language", StringUtils.isNotBlank(result.getResults().get(0).getLanguage())); assertTrue("No language", StringUtils.isNotBlank(result.getResults().get(0).getCountry()));
assertTrue("No rating", StringUtils.isNotBlank(result.getResults().get(0).getRating())); assertTrue("No rating", StringUtils.isNotBlank(result.getResults().get(0).getRating()));
} }
} }

Loading…
Cancel
Save