Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public void ListingController_Delete_ReturnsViewResult()
        {
            var result = _listingController.Delete(new AmazonListing());

            result.Should().BeOfType <ViewResult>();
        }