Beispiel #1
0
            public void _1_1_4_Test()
            {
                var n        = 3;
                var a        = 2;
                var testable = new _1_1_4();

                var result = testable.Run(a, n);

                Assert.That(result == 8 && result == Math.Pow(a, n));
            }
Beispiel #2
0
            public void _1_1_4Pow_AnyInputValues_Success()
            {
                var testable = new _1_1_4();

                Prop.ForAll(
                    Arb.From <int>().Filter(x => x > 0 && x < 10),
                    Arb.From <int>().Filter(x => x > 0 && x < 10),
                    (a, n) =>
                {
                    var result = testable.Run(a, n);

                    Assert.That(result == Math.Pow(a, n));
                }).QuickCheckThrowOnFailure();
            }