Correct iso_3166 to country not language
This commit is contained in:
@@ -34,22 +34,22 @@ public class ProductionCountry extends AbstractJsonMapping {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@JsonProperty("iso_3166_1")
|
||||
private String isoCode;
|
||||
private String country;
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
public String getIsoCode() {
|
||||
return isoCode;
|
||||
public String getCountry() {
|
||||
return country;
|
||||
}
|
||||
|
||||
public void setCountry(String country) {
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setIsoCode(String isoCode) {
|
||||
this.isoCode = isoCode;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
@@ -60,7 +60,7 @@ public class ProductionCountry extends AbstractJsonMapping {
|
||||
final ProductionCountry other = (ProductionCountry) obj;
|
||||
return new EqualsBuilder()
|
||||
.append(name, other.name)
|
||||
.append(isoCode, other.isoCode)
|
||||
.append(country, other.country)
|
||||
.isEquals();
|
||||
} else {
|
||||
return false;
|
||||
@@ -70,7 +70,7 @@ public class ProductionCountry extends AbstractJsonMapping {
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return new HashCodeBuilder()
|
||||
.append(isoCode)
|
||||
.append(country)
|
||||
.append(name)
|
||||
.toHashCode();
|
||||
}
|
||||
|
||||
@@ -28,16 +28,16 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class ContentRating {
|
||||
|
||||
@JsonProperty("iso_3166_1")
|
||||
private String language;
|
||||
private String country;
|
||||
@JsonProperty("rating")
|
||||
private String rating;
|
||||
|
||||
public String getLanguage() {
|
||||
return language;
|
||||
public String getCountry() {
|
||||
return country;
|
||||
}
|
||||
|
||||
public void setLanguage(String language) {
|
||||
this.language = language;
|
||||
public void setCountry(String country) {
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
public String getRating() {
|
||||
|
||||
@@ -170,7 +170,7 @@ public class TmdbTVTest extends AbstractTests {
|
||||
for (TestID test : TV_IDS) {
|
||||
ResultList<ContentRating> result = instance.getTVContentRatings(test.getTmdb());
|
||||
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()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user