public void ChangeQuantity_Returns_RedirectToActionResult() { // Arrange var basketDbSetMock = Builder <BasketItemViewModel> .CreateListOfSize(5).Build(); _iBasketRepositoryMock.Setup(repo => repo.GetBasketItem(1)).Returns(basketDbSetMock); //// Act var result = _basketController.ChangeQuantity(1, 4); //// Assert var viewResult = Assert.IsType <RedirectToActionResult>(result); Assert.Equal("Index", viewResult.ActionName); }