public async Task CheckHasAllApprovedTemplateCalculationsForSpecificationId_GivenResult_ReturnsExpectedResponseValue(int result, bool expected) { //Arrange ICalculationsRepository calculationsRepository = CreateCalculationsRepository(); calculationsRepository .GetCountOfNonApprovedTemplateCalculations(Arg.Is(SpecificationId)) .Returns(result); CalculationService calculationService = CreateCalculationService(calculationsRepository: calculationsRepository); //Act IActionResult actionResult = await calculationService.CheckHasAllApprovedTemplateCalculationsForSpecificationId(SpecificationId); //Assert BooleanResponseModel responseModel = (actionResult as OkObjectResult).Value as BooleanResponseModel; responseModel .Value .Should() .Be(expected); }