Beispiel #1
0
        public void TestNegativeN3()
        {
            double expected = -0.5;
            double actual   = MyPower.Power(-2, -1);

            Assert.AreEqual(expected, actual);
        }
Beispiel #2
0
        public void TestNegativeN2()
        {
            double expected = -8;
            double actual   = MyPower.Power(-2, 3);

            Assert.AreEqual(expected, actual);
        }
Beispiel #3
0
        public void TestWithPositiveN2()
        {
            double expected = 27;
            double actual   = MyPower.Power(3, 3);

            Assert.AreEqual(expected, actual);
        }
Beispiel #4
0
        public void TestWithPositiveN3()
        {
            double expected = 4;
            double actual   = MyPower.Power(-2, 2);

            Assert.AreEqual(expected, actual);
        }
Beispiel #5
0
        public void TestMethod1()
        {
            double expected = 1;
            double actual   = MyPower.Power(5, 0);

            Assert.AreEqual(expected, actual);
        }