public async Task LoadingPlaceDetail_Success() { //Arrange deliveryService.Setup(x => x.GetLoadingPlace(loadingPlaceId)).Returns(Task.FromResult(new LoadingPlace { Id = loadingPlaceId })); //Act var action = await deliveryController.LoadingPlaceDetail(loadingPlaceId) as ViewResult; var model = action.Model as LoadingPlaceDetailViewModel; //Assert Assert.Equal(loadingPlaceId, model.LoadingPlace.Id); }