public void NoteWillMoveLocation_WhenTimeElapses() { int currentNoteLocation = 5; TimeSpan elapsedTime = TimeSpan.FromSeconds( 3 ); Game game = new InstrumentedGame( GameConfig.DefaultGameConfig, currentNoteLocation ); currentNoteLocation = game.MoveNote( elapsedTime ); Assert.AreEqual( 14, currentNoteLocation ); }
public void WillExtraLoseExtraPoints_WhenPressingWrongButtonAtWrongTime() { int currentNoteLocation = 4; var correctNoteType = NoteType.C; var userEnteredNoteType = NoteType.D; Game game = new InstrumentedGame( GameConfig.DefaultGameConfig, currentNoteLocation ); game.ScoreUserInput( userEnteredNoteType, correctNoteType ); Assert.AreEqual( -3, game.TotalScore ); }
public void WhenPressingWrongButton_WillReturnWrongNoteResult() { int currentNoteLocation = 10; var correctNoteType = NoteType.C; var userEnteredNoteType = NoteType.D; Game game = new InstrumentedGame( GameConfig.DefaultGameConfig, currentNoteLocation ); ScoreResult result = game.ScoreUserInput( userEnteredNoteType, correctNoteType ); Assert.AreEqual( ScoreResult.WrongNote, result ); }
public void WillHaveNegativeTotalScore_WhenPressingWrongButtonAtWrongTimeManyTimes() { int currentNoteLocation = 4; var correctNoteType = NoteType.C; var userEnteredNote = NoteType.D; Game game = new InstrumentedGame( GameConfig.DefaultGameConfig, currentNoteLocation ); game.ScoreUserInput( userEnteredNote, correctNoteType ); game.ScoreUserInput( userEnteredNote, correctNoteType ); game.ScoreUserInput( userEnteredNote, correctNoteType ); Assert.AreEqual( -9, game.TotalScore ); }
public void WillScorePoints_WhenPressingButtonAtTheRightTime() { int currentNoteLocation = 10; var userEnteredNoteType = NoteType.C; var correctNoteType = NoteType.C; Game game = new InstrumentedGame( GameConfig.DefaultGameConfig, currentNoteLocation ); game.ScoreUserInput( userEnteredNoteType, correctNoteType ); Assert.AreEqual( 3, game.TotalScore ); }
public void WillHaveProperTotalScore_WhenPressingGettingNoteRightAtRightTimeMultipleTimes() { int currentNoteLocation = 10; var correctNoteType = NoteType.C; var userEnteredNoteType = NoteType.C; Game game = new InstrumentedGame( GameConfig.DefaultGameConfig, currentNoteLocation ); game.ScoreUserInput( userEnteredNoteType, correctNoteType ); game.ScoreUserInput( userEnteredNoteType, correctNoteType ); game.ScoreUserInput( userEnteredNoteType, correctNoteType ); Assert.AreEqual( 9, game.TotalScore ); }