コード例 #1
0
        public void CalculateTest(double firstValue, double expected)
        {
            var calculator   = new LogOfTwoCalculator();
            var actualResult = calculator.Calculate(firstValue);

            Assert.AreEqual(expected, actualResult);
        }
コード例 #2
0
        public void NegativeLogOfTwoCalculatorTest()
        {
            var calculator = new LogOfTwoCalculator();

            Assert.Throws <Exception>(() => calculator.Calculate(-1));
        }