示例#1
0
文件: UnitTest1.cs 项目: Hung488/BT
        public void TestNegativeN3()
        {
            double expected = -0.5;
            double actual   = MyPower.Power(-2, -1);

            Assert.AreEqual(expected, actual);
        }
示例#2
0
文件: UnitTest1.cs 项目: Hung488/BT
        public void TestNegativeN2()
        {
            double expected = -8;
            double actual   = MyPower.Power(-2, 3);

            Assert.AreEqual(expected, actual);
        }
示例#3
0
文件: UnitTest1.cs 项目: Hung488/BT
        public void TestWithPositiveN2()
        {
            double expected = 27;
            double actual   = MyPower.Power(3, 3);

            Assert.AreEqual(expected, actual);
        }
示例#4
0
文件: UnitTest1.cs 项目: Hung488/BT
        public void TestWithPositiveN3()
        {
            double expected = 4;
            double actual   = MyPower.Power(-2, 2);

            Assert.AreEqual(expected, actual);
        }
示例#5
0
文件: UnitTest1.cs 项目: Hung488/BT
        public void TestMethod1()
        {
            double expected = 1;
            double actual   = MyPower.Power(5, 0);

            Assert.AreEqual(expected, actual);
        }