Cantagallo/Cantagallo/Test/UnitTestPlayer.cs
/// <summary>
/// this method tests player's jumps
/// </summary>
/// <seealso cref="IPlayer.JumpCounter"/>
/// <seealso cref="IPlayer.JumpsHeight"/>
/// <seealso cref="IPlayer.MaxJumps"/>
/// <seealso cref="IPlayer.ResetNJumps"/>
/// <seealso cref="IPlayer.DecreaseJumps"/>
this method tests player's jumps
this method tests player ' s jumps
[Fact]
        public void PlayerJumpSetterTest()
        {
            IPlayer player = new PlayerImpl();
            Assert.Equal(-550, player.JumpsHeight);
            player.JumpsHeight = 0;
            Assert.Equal(0, player.JumpsHeight);
            Assert.True(player.JumpCounter == player.MaxJumps);
            player.DecreaseJumps();
            Assert.True(player.JumpCounter < player.MaxJumps);
            Assert.Equal(0, player.JumpCounter);
            player.ResetNJumps();
            Assert.True(player.JumpCounter == player.MaxJumps);
            player.MaxJumps = 5;
            Assert.True(player.JumpCounter < player.MaxJumps);
        }
[ Fact ] public void PlayerJumpSetterTest ( ) { IPlayer player = new PlayerImpl ( ) ; Assert . Equal ( - 550 , player . JumpsHeight ) ; player . JumpsHeight = 0 ; Assert . Equal ( 0 , player . JumpsHeight ) ; Assert . True ( player . JumpCounter == player . MaxJumps ) ; player . DecreaseJumps ( ) ; Assert . True ( player . JumpCounter < player . MaxJumps ) ; Assert . Equal ( 0 , player . JumpCounter ) ; player . ResetNJumps ( ) ; Assert . True ( player . JumpCounter == player . MaxJumps ) ; player . MaxJumps = 5 ; Assert . True ( player . JumpCounter < player . MaxJumps ) ; }
this method tests player's jumps
this method tests player ' s jumps
seealso
None
seealso
None
seealso
None
seealso
None
seealso
None