Skip to content

Instantly share code, notes, and snippets.

@izmajlowiczl
Created March 10, 2013 19:45
Show Gist options
  • Save izmajlowiczl/5130109 to your computer and use it in GitHub Desktop.
Save izmajlowiczl/5130109 to your computer and use it in GitHub Desktop.
Zahhak's @testwith example
@TestWith({
"0",
"1",
"2"
})
public void AddScore_AddPositiveScore_IncreaseExistingScore(int value) throws Exception {
final UserScoreRepository userScoreRepositoryStub = Make_FakeUserScoreRepository();
final User fakeUser = Make_User();
final UserScoreService userScore = new UserScoreService(userScoreRepositoryStub);
final int scoreAfterAddingNewValue = userScore.add(fakeUser, value);
assertEquals(value, scoreAfterAddingNewValue);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment