public void FilterShows_ReturnsNull_WhenRequestIsNull() { //Arrange var target = new FilterService(); //Action var actual = target.FilterShows(null); //Assert Assert.IsNull(actual); }
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); }
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); }
public void FilterShows_ReturnsNull_WhenPayloadIsNull() { //Arrange var target = new FilterService(); var request = new Request(); //Action var actual = target.FilterShows(request); //Assert Assert.IsNull(actual); }
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[])); }