Cantagallo/Cantagallo/Test/UnitTestPlayer.cs
/// <summary>
/// this method tests player's textures
/// </summary>
/// <seealso cref="PlayerTexture"/>
this method tests player's textures
this method tests player ' s textures
[Fact]
        public void PlayerTextureTest()
        {
            IPlayer player = new PlayerImpl();
            PlayerTexture texture = new PlayerTexture(PlayerColor.Blue);
            string idleblue;
            texture.GetTexture().TextureMap.TryGetValue(TLMSType.IDLE, out idleblue);
            Assert.Equal("Gunner_Blue_Idle.png", idleblue);
            string jumpblue;
            texture.GetTexture().TextureMap.TryGetValue(TLMSType.JUMP, out jumpblue);
            Assert.Equal("Gunner_Blue_Jump.png", jumpblue);
            texture = new PlayerTexture(PlayerColor.Red);
            string runred;
            texture.GetTexture().TextureMap.TryGetValue(TLMSType.RUN, out runred);
            Assert.Equal("Gunner_Red_Run.png", runred);
            texture = new PlayerTexture(PlayerColor.Blue);
            string bluedead;
            texture.GetTexture().TextureMap.TryGetValue(TLMSType.DEAD, out bluedead);
            Assert.Equal("Gunner_Blue_Death.png", bluedead);
        }
[ Fact ] public void PlayerTextureTest ( ) { IPlayer player = new PlayerImpl ( ) ; PlayerTexture texture = new PlayerTexture ( PlayerColor . Blue ) ; string idleblue ; texture . GetTexture ( ) . TextureMap . TryGetValue ( TLMSType . IDLE , out idleblue ) ; Assert . Equal ( " " , idleblue ) ; string jumpblue ; texture . GetTexture ( ) . TextureMap . TryGetValue ( TLMSType . JUMP , out jumpblue ) ; Assert . Equal ( " " , jumpblue ) ; texture = new PlayerTexture ( PlayerColor . Red ) ; string runred ; texture . GetTexture ( ) . TextureMap . TryGetValue ( TLMSType . RUN , out runred ) ; Assert . Equal ( " " , runred ) ; texture = new PlayerTexture ( PlayerColor . Blue ) ; string bluedead ; texture . GetTexture ( ) . TextureMap . TryGetValue ( TLMSType . DEAD , out bluedead ) ; Assert . Equal ( " " , bluedead ) ; }
this method tests player's textures
this method tests player ' s textures
seealso
None