コード例 #1
0
        public void TestMethodFrogCannotReach()
        {
            FrogJumpBackTracking jumpBackTracking = new FrogJumpBackTracking();
            bool hasReached = jumpBackTracking.FrogJump(new[] { 1, 3, 6, 7, 11 });

            Assert.IsFalse(hasReached, "The frog should not reach the destination.");
        }
コード例 #2
0
        public void TestMethodFrogCanReach()
        {
            FrogJumpBackTracking jumpBackTracking = new FrogJumpBackTracking();
            bool hasReached = jumpBackTracking.FrogJump(new [] { 0, 1, 3, 5, 6, 8, 12, 17 });

            Assert.IsTrue(hasReached, "The frog should reach the destination.");
        }