public void Evaluate_CreatesExpectedResult() { // GIVEN var output = new BonusCalculation(); var decisionResult = new DecisionResult <EmployeeInfo, BonusCalculation> { CreateResult = sampleInput => output }; var input = new EmployeeInfo(); // WHEN var actualOutput = decisionResult.Evaluate(input); // THEN actualOutput.Should().Be(output); }
public void EvaluateWithPath_GivenPath_ReturnsExpectedPath() { // GIVEN var output = new BonusCalculation(); var decisionResult = new DecisionResult <EmployeeInfo, BonusCalculation> { CreateResult = sampleInput => output }; var input = new EmployeeInfo(); var decisionPath = new DecisionPath(); // WHEN var result = decisionResult.EvaluateWithPath(input, decisionPath); // THEN result.DecisionPath.Should().Be(decisionPath); }