public void CalculateCall() { var calculationService = new Mock<IPriceCalculationService>(); var viewModel = new PriceCalculationViewModel { PlanType = PlanType.VoicePlan1 }; calculationService.Setup(x => x.CalculatePrice(It.IsAny<PriceCalculationViewModel>())).Returns(new Price(10)); var controller = new HomeController(calculationService.Object); var result = controller.CalculateCall(viewModel).As<PartialViewResult>(); result.Should().NotBeNull(); result.Model.As<Price>().Value.Should().Be(10); }