コード例 #1
0
        public void TestGetResult_Negative()
        {
            BigInteger[] data = { 0, 1, 2, 3 };
            FibonacciResultSet testSet = new FibonacciResultSet { Results = data };

            BigInteger result = testSet.GetResult(-1);
        }
コード例 #2
0
        public void TestGetResult_Empty()
        {
            BigInteger[] data = {};
            FibonacciResultSet testSet = new FibonacciResultSet { Results = data };

            BigInteger result = testSet.GetResult(5);
        }
コード例 #3
0
        public void TestGetResult_Valid()
        {
            BigInteger[] data = { 0, 1, 2, 3 };
            FibonacciResultSet testSet = new FibonacciResultSet { Results = data };

            BigInteger expected = 1;
            BigInteger actual = testSet.GetResult(1);

            Assert.AreEqual(expected, actual);
        }