コード例 #1
0
        public void IndexInSequence_1stTerm()
        {
            var problem = new Problem1();

            var result = problem.IndexInSequence(4, 4);

            Assert.AreEqual(1, result);
        }
コード例 #2
0
        public void LargestNumberInSeries_InvalidLimit2()
        {
            var problem = new Problem1();

            var result = problem.IndexInSequence(1, -2);

            Assert.Fail();
        }
コード例 #3
0
        public void IndexInSequence_InvalidNthTerm2()
        {
            var problem = new Problem1();

            var result = problem.IndexInSequence(1, -2);

            Assert.Fail();
        }
コード例 #4
0
        public void IndexInSequence_InvalidMultiplier2()
        {
            var problem = new Problem1();

            var result = problem.IndexInSequence(-10, 3);

            Assert.Fail();
        }
コード例 #5
0
        public void IndexInSequence_After3rdTermBefore4th()
        {
            var problem = new Problem1();

            var result = problem.IndexInSequence(4, 13);

            Assert.AreEqual(3, result);
        }
コード例 #6
0
        public void IndexInSequence_2ndTerm()
        {
            var problem = new Problem1();

            var result = problem.IndexInSequence(4, 8);

            Assert.AreEqual(2, result);
        }