コード例 #1
0
        public void Log2CalcTest(double first, double expected)
        {
            var    calc   = new Log2Calc();
            double result = calc.Calculate(first);

            Assert.AreEqual(expected, result, 0.001);
        }
コード例 #2
0
        public void Againstzero()
        {
            var calc = new Log2Calc();

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