Ejemplo n.º 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);
            }
Ejemplo n.º 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; });
            }
Ejemplo n.º 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; });
            }
Ejemplo n.º 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; });
            }
Ejemplo n.º 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/");
            }
Ejemplo n.º 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; });
            }
Ejemplo n.º 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);
            }