public async void ReturnValidModelForCorrectId(int?id) { var result = await sut.Edit(id); var vr = Assert.IsType <ViewResult>(result); fixture.repositoryWrapper.Verify(y => y.Service.GetServiceByIdAsync(id), Times.Once); Assert.Equal("Edit", vr.ViewName); Assert.IsAssignableFrom <ServiceDTO>(vr.Model); }