예제 #1
0
        public void FilterShows_ReturnsNull_WhenRequestIsNull()
        {
            //Arrange
            var target = new FilterService();

            //Action

            var actual = target.FilterShows(null);

            //Assert

            Assert.IsNull(actual);
        }
예제 #2
0
        public void FilterShows_Returns_CorrectNumberOfShows()
        {
            //Arrange
            var target = new FilterService();
            var expected = ShowsMockHelper.GetMockedShows().Length;
            //Action

            var actual = target.FilterShows(ShowsMockHelper.GetMockedRequest());

            //Assert

            Assert.IsNotNull(actual);
            Assert.AreEqual(actual.Length, expected);
        }
예제 #3
0
        public void FilterShows_ReturnsCorrectShows_ForAValidRequest()
        {
            //Arrange
            var target = new FilterService();
            var expected = ShowsMockHelper.GetMockedShows();
            //Action

            var actual = target.FilterShows(ShowsMockHelper.GetMockedRequest());

            //Assert

            Assert.IsNotNull(actual);
            CollectionAssert.AreEqual(actual, expected);
        }
예제 #4
0
        public void FilterShows_ReturnsNull_WhenPayloadIsNull()
        {
            //Arrange
            var target = new FilterService();
            var request = new Request();

            //Action

            var actual = target.FilterShows(request);

            //Assert

            Assert.IsNull(actual);
        }
예제 #5
0
        public void FilterShows_Always_ReturnAnArrayOfShows()
        {
            //Arrange
            var target = new FilterService();

            //Action

            var actual = target.FilterShows(ShowsMockHelper.GetMockedRequest());

            //Assert

            Assert.IsNotNull(actual);
            Assert.IsInstanceOfType(actual,typeof(Show[]));
        }