Example #1
0
            public void FamousActor_ReturnResults(string actorName)
            {
                var obj = new SUT.EasyClient("6d4b546936310f017557b2fb498b370b");
                var d   = obj.GetApi <IMovieApi>().Value;

                CollectionAssert.IsNotEmpty(d.SearchByActorAsync(actorName).Result.Results);
            }
Example #2
0
            public void IncorrectId_ThrowsException(int id, string language = "en")
            {
                //arrange
                var obj = new SUT.EasyClient("6d4b546936310f017557b2fb498b370b");
                var d   = obj.GetApi <ICollectionApi>().Value;

                //assert
                Assert.Throws <AggregateException>(() => { SUT.TmdbObjects.Images.Images ima = d.GetImagesAsync(id, language).Result; });
            }
Example #3
0
            public void IncorrectId_ThrowsException(int id)
            {
                //arrange
                var obj = new SUT.EasyClient("6d4b546936310f017557b2fb498b370b");
                var d   = obj.GetApi <INetworksApi>().Value;

                //assert
                Assert.Throws <AggregateException>(() => { SUT.TmdbObjects.Other.Network nt = d.GetDetailsAsync(id).Result; });
            }
Example #4
0
            public void IncorrectId_ThrowsException(int id, string language = "en")
            {
                //arrange
                var obj = new SUT.EasyClient("6d4b546936310f017557b2fb498b370b");
                var d   = obj.GetApi <IMovieApi>().Value;

                //assert
                Assert.Throws <AggregateException>(() => { SUT.TmdbObjects.Movies.AlternativeTitle tit = d.GetAlternativeTitlesAsync(id).Result; });
            }
Example #5
0
            public void UnSecuredParam_AssignsUnsecureUrl(string _apikey, bool secure = false)
            {
                //Arrange
                var obj = new SUT.EasyClient(_apikey, secure);

                //Assert
                Assert.AreEqual(SUT.REngine.Secured, false);
                Assert.AreEqual(SUT.REngine.Url, "http://api.themoviedb.org/3/");
            }
Example #6
0
            public void IncorrectDate_ThrowsException(string end_date = null, string start_date = null, int page = 1)
            {
                //arrange
                var obj = new SUT.EasyClient("6d4b546936310f017557b2fb498b370b");
                var d   = obj.GetApi <IChangesApi>().Value;

                //assert
                Assert.Throws <AggregateException>(() => { SUT.TmdbObjects.Changes.ChangeList ch
                                                               = d.GetMovieChangeListAsync(end_date, start_date, page).Result; });
            }
Example #7
0
            public async Task CorrectQuery_DoesNotReturnNull(int id)
            {
                //arrange
                var obj = new SUT.EasyClient("6d4b546936310f017557b2fb498b370b");
                var d   = obj.GetApi <IMovieApi>().Value;

                //act
                SUT.TmdbObjects.Movies.MovieFullDetails mov = await d.GetDetailsAsync(id).ConfigureAwait(false);

                //assert
                Assert.IsNotNull(mov);
            }