Ejemplo n.º 1
0
        public void It_Should_Search_Movies_By_Title()
        {
            var movieTitle = "Title";
              var expectedMovie = new Movie {Title = movieTitle};
              var movieContext = new MoviesContextMock(new List<Movie> {expectedMovie});

              var result = movieContext.SearchMovie(movieTitle);

              Assert.AreEqual(expectedMovie, result.ToList()[0]);
        }
Ejemplo n.º 2
0
        public void Title_Search_Should_Recognise_Partial_Matches()
        {
            var movieTitle = "The Title 44";
              var expectedMovie = new Movie {Title = movieTitle};
              var movieContext = new MoviesContextMock(new List<Movie> {expectedMovie});

              var result = movieContext.SearchMovie("Title").ToList();

              Assert.AreEqual(1, result.Count());
              Assert.AreEqual(expectedMovie, result[0]);
        }
Ejemplo n.º 3
0
        public void Title_Search_Should_Be_Case_Insensitive()
        {
            var movieTitle = "The Title 44";
              var expectedMovie = new Movie {Title = movieTitle};
              var movieContext = new MoviesContextMock(new List<Movie> {expectedMovie});

              var result = movieContext.SearchMovie("tITLE").ToList();

              Assert.AreEqual(1, result.Count());
              Assert.AreEqual(expectedMovie, result[0]);
        }
Ejemplo n.º 4
0
        public void It_Should_Search_Movies_By_Title()
        {
            var movieTitle    = "Title";
            var expectedMovie = new Movie {
                Title = movieTitle
            };
            var movieContext = new MoviesContextMock(new List <Movie> {
                expectedMovie
            });


            var result = movieContext.SearchMovie(movieTitle);

            Assert.AreEqual(expectedMovie, result.ToList()[0]);
        }
Ejemplo n.º 5
0
        public void Title_Search_Should_Be_Case_Insensitive()
        {
            var movieTitle    = "The Title 44";
            var expectedMovie = new Movie {
                Title = movieTitle
            };
            var movieContext = new MoviesContextMock(new List <Movie> {
                expectedMovie
            });


            var result = movieContext.SearchMovie("tITLE").ToList();

            Assert.AreEqual(1, result.Count());
            Assert.AreEqual(expectedMovie, result[0]);
        }
Ejemplo n.º 6
0
        public void Title_Search_Should_Recognise_Partial_Matches()
        {
            var movieTitle    = "The Title 44";
            var expectedMovie = new Movie {
                Title = movieTitle
            };
            var movieContext = new MoviesContextMock(new List <Movie> {
                expectedMovie
            });


            var result = movieContext.SearchMovie("Title").ToList();

            Assert.AreEqual(1, result.Count());
            Assert.AreEqual(expectedMovie, result[0]);
        }