Esempio n. 1
0
        public void EitherCalculation_Should_Return_CorrectResult(double op1, double op2, double expected)
        {
            //Arrange
            ICalculation either = new EitherCalculation(op1, op2);

            //Act
            double actual = either.Calculate();

            //Assert
            Assert.AreEqual(expected, actual);
        }
Esempio n. 2
0
        public void Calculate_ReturnsExpectedResult()
        {
            // Arrange
            var pa          = 0.7M;
            var pb          = 0.8M;
            var calculation = new EitherCalculation(pa, pb);

            // Act
            var result = calculation.Calculate();

            // Assert
            result.Should().Be(0.94M);
        }