public void CalculateWithFakesTest(double inputValue, double expectedResult) { var service = new Service(); var randomService = new FakeRandomService(); var actualResult = service.Calculate(inputValue, randomService); Assert.AreEqual(expectedResult, actualResult); }
public void CalculateInvocationWithFakesTest(double inputValue, int expectedResult) { var service = new Service(); var randomService = new FakeRandomService(); service.Calculate(inputValue, randomService); var actualResult = randomService.GetRandomValueInvocationCount; actualResult.Should().Be(expectedResult); }