public void Should_Output1Point21_WhenDoind1Point1Multyply1Point1() { //arrange var outputServise = new Mock<IOutputServise>(); var calculator = new CalculatorEngine(outputServise.Object); //act calculator.Multiply(1.1, 1.1); //assert outputServise.Verify(x => x.Output(1.21), Times.Once()); }
public void Should_Return1Point21_WhenDoind1Point1Multyply1Point1() { //arrange var outputServise = new Mock<IOutputServise>(); var calculator = new CalculatorEngine(outputServise.Object); string expectedResult = "1,21000"; //act calculator.Multiply(1.1, 1.1); //assert Assert.AreEqual(calculator.correctResult, expectedResult); }