public async void ReturnValidModelForCorrectId(int?id) { var result = await sut.Delete(id); var vr = Assert.IsType <ViewResult>(result); fixture.repositoryWrapper.Verify(y => y.Listing.GetListingByIdAsync(id), Times.Once); Assert.Equal("Delete", vr.ViewName); Assert.IsAssignableFrom <ListingManagementDTO>(vr.Model); }
public void ListingController_Delete_ReturnsViewResult() { var result = _listingController.Delete(new AmazonListing()); result.Should().BeOfType <ViewResult>(); }