Exemplo n.º 1
0
        public void CorrectlyCountJumpsWithBalancingStrategy()
        {
            OffsetJumper jumper = new OffsetJumper(new int[] { 0, 3, 0, 1, -3 }, new BalancingStrategy());

            Assert.Equal(10, jumper.StepsToExit());
        }
Exemplo n.º 2
0
        public void CorrectlyCountJumpsWithIncrementStrategy()
        {
            OffsetJumper jumper = new OffsetJumper(new int[] { 0, 3, 0, 1, -3 }, new IncrementStrategy());

            Assert.Equal(5, jumper.StepsToExit());
        }