示例#1
0
        public async Task UpdateMovieAsync_Exisiting_Movie_Should_Return_True()
        {
            Movies.API.Movies movie = new Movies.API.Movies {
                Id = 9, Name = "New Movie", PortraitUrl = "none", Year = 2021
            };

            var result = await _sut.UpdateMovieAsync(movie);

            Assert.IsTrue(result);
        }
示例#2
0
        public async Task UpdateMovieAsync_Missing_Movie_Should_Return_False()
        {
            Movies.API.Movies movie = new Movies.API.Movies {
                Id = 999, Name = "Does not Exist", PortraitUrl = "none", Year = 2021
            };

            var result = await _sut.UpdateMovieAsync(movie);

            Assert.IsFalse(result);
        }
示例#3
0
        public async Task CreateMovieAsync_Should_Return_New_Movie_With_New_Id()
        {
            Movies.API.Movies movie = new Movies.API.Movies {
                Id = 0, Name = "New Movie", PortraitUrl = "none", Year = 2000
            };

            var data = await _sut.CreateMovieAsync(movie);

            Assert.IsTrue(data.Id == 11);
        }
示例#4
0
        public async Task UpdateMovieAsync_ArgumentNullException()
        {
            Movies.API.Movies movie = null;

            var data = await _sut.UpdateMovieAsync(movie);
        }