public void CheckIfAlive() { int initialLives = 3; var striker = new Striker(new MockBoard(), new MockConsoleWriter(), initialLives); striker.ReduceLives(1); Assert.True(striker.Alive()); striker.ReduceLives(initialLives - 1); Assert.False(striker.Alive()); }
public void ReduceLives() { int initialLives = 3, livesToDecrement = 1; var striker = new Striker(new MockBoard(), new MockConsoleWriter(), initialLives); striker.ReduceLives(livesToDecrement); Assert.Equal(initialLives - livesToDecrement, striker.GetLivesLeft()); }
public void Reset() { int maximumLives = 3, livesToDecrement = 1; var striker = new Striker(new MockBoard(), new MockConsoleWriter()); striker.ReduceLives(livesToDecrement); striker.MoveRight(); Assert.NotEqual(maximumLives, striker.GetLivesLeft()); Assert.NotEqual(0, striker.GetMovesTaken()); striker.Reset(); Assert.Equal(maximumLives, striker.GetLivesLeft()); Assert.Equal(0, striker.GetMovesTaken()); }