File tree Expand file tree Collapse file tree 6 files changed +18
-1
lines changed
main/java/com/uwetrottmann/tmdb2/entities
test/java/com/uwetrottmann/tmdb2/assertions Expand file tree Collapse file tree 6 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ Change Log
66* Note: TMDB has added additional primary translation languages: ` ku-TR ` , ` so-SO ` and ` uz-UZ ` .
77* Add ` rent ` to ` WatchProviders.CountryInfo ` that contains rental providers for a movie.
88* ` DiscoverTvBuilder ` : add ` vote_average_lte ` and ` vote_count_lte ` . [ #103 ] ( https://github.com/UweTrottmann/tmdb-java/issues/103 )
9+ * Add ` spoken_languages ` to ` TvShow ` , add ` english_name ` to ` SpokenLanguage ` . [ #91 ] ( https://github.com/UweTrottmann/tmdb-java/issues/91 )
910
1011## 2.11.0
1112_ 2024-06-07_
Original file line number Diff line number Diff line change 55
66public class SpokenLanguage {
77
8+ public String english_name ;
89 public String iso_639_1 ;
910 public String name ;
1011
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ public class TvShow extends BaseTvShow {
2020 public Integer number_of_seasons ;
2121 public List <BaseCompany > production_companies ;
2222 public List <TvSeason > seasons ;
23+ public List <SpokenLanguage > spoken_languages ;
2324 public String status ;
2425 public String tagline ;
2526 public String type ;
Original file line number Diff line number Diff line change 1414import com .uwetrottmann .tmdb2 .entities .ContentRatings ;
1515import com .uwetrottmann .tmdb2 .entities .Image ;
1616import com .uwetrottmann .tmdb2 .entities .NetworkImage ;
17+ import com .uwetrottmann .tmdb2 .entities .SpokenLanguage ;
1718import com .uwetrottmann .tmdb2 .entities .Status ;
1819import com .uwetrottmann .tmdb2 .entities .TaggedImage ;
1920import com .uwetrottmann .tmdb2 .entities .TaggedImagesResultsPage ;
@@ -162,6 +163,14 @@ public static void assertBaseRatingObject(BaseRatingObject baseRatingObject) {
162163 assertThat (baseRatingObject .rating ).isNotNull ();
163164 }
164165
166+ public static void assertSpokenLanguages (List <SpokenLanguage > spokenLanguages ) {
167+ for (SpokenLanguage language : spokenLanguages ) {
168+ assertThat (language .english_name ).isNotEmpty ();
169+ assertThat (language .iso_639_1 ).isNotEmpty ();
170+ assertThat (language .name ).isNotEmpty ();
171+ }
172+ }
173+
165174 public static void assertStatus (Status status ) {
166175 assertThat (status ).isNotNull ();
167176 assertThat (status .status_code ).isNotNull ();
Original file line number Diff line number Diff line change 66import static com .uwetrottmann .tmdb2 .TestData .testProductionCompany ;
77import static com .uwetrottmann .tmdb2 .assertions .CompanyAssertions .assertBaseCompany ;
88import static com .uwetrottmann .tmdb2 .assertions .GenericAssertions .assertBaseResultsPage ;
9+ import static com .uwetrottmann .tmdb2 .assertions .GenericAssertions .assertSpokenLanguages ;
910import static org .assertj .core .api .Assertions .assertThat ;
1011
1112import com .uwetrottmann .tmdb2 .TestData ;
@@ -41,7 +42,6 @@ public static void assertBaseMovie(BaseMovie movie) {
4142 public static void assertMovie (Movie movie ) {
4243 assertBaseMovie (movie );
4344 assertThat (movie .tagline ).isNotEmpty ();
44- assertThat (movie .spoken_languages ).isNotNull ();
4545 assertThat (movie .homepage ).isNotNull ();
4646 assertThat (movie .budget ).isNotNull ();
4747 assertThat (movie .imdb_id ).isNotNull ();
@@ -55,6 +55,8 @@ public static void assertMovie(Movie movie) {
5555 }
5656
5757 assertThat (movie .revenue ).isNotNull ();
58+ assertThat (movie .spoken_languages ).isNotEmpty ();
59+ assertSpokenLanguages (movie .spoken_languages );
5860 assertThat (movie .status ).isNotNull ();
5961 }
6062
Original file line number Diff line number Diff line change 1010import static com .uwetrottmann .tmdb2 .assertions .CreditAssertions .assertCastCredits ;
1111import static com .uwetrottmann .tmdb2 .assertions .CreditAssertions .assertCrewCredits ;
1212import static com .uwetrottmann .tmdb2 .assertions .GenericAssertions .assertBaseResultsPage ;
13+ import static com .uwetrottmann .tmdb2 .assertions .GenericAssertions .assertSpokenLanguages ;
1314import static com .uwetrottmann .tmdb2 .assertions .GenreAssertions .assertGenre ;
1415import static com .uwetrottmann .tmdb2 .assertions .NetworkAssertions .assertNetwork ;
1516import static com .uwetrottmann .tmdb2 .assertions .PersonAssertions .assertBasePerson ;
@@ -111,6 +112,8 @@ public static void assertTvShow(TvShow tvShow) {
111112 assertThat (tvSeason .episode_count ).isGreaterThanOrEqualTo (0 );
112113 }
113114
115+ assertThat (tvShow .spoken_languages ).isNotEmpty ();
116+ assertSpokenLanguages (tvShow .spoken_languages );
114117 }
115118
116119 public static void assertTvShowDataIntegrity (TvShow tvShow ) {
You can’t perform that action at this time.
0 commit comments