Exemplo n.º 1
0
            public void Test()
            {
                var n        = 2;
                var a        = 4;
                var testable = new _1_1_3();

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

                Assert.That(result == 16 && result == Math.Pow(a, n));
            }
Exemplo n.º 2
0
            public void Pow_AnyInputValues_Success()
            {
                var testable = new _1_1_3();

                Prop.ForAll <int, int>(
                    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();
            }