Skip to content
Snippets Groups Projects
Commit e2be39da authored by Tomas Madeja's avatar Tomas Madeja Committed by Ján Dovjak
Browse files

test: add test for getter of existing team

parent 270f29d4
No related branches found
No related tags found
No related merge requests found
......@@ -52,6 +52,15 @@ class TeamServiceImplTest {
verify(teamDao).read(1L);
}
@Test
public void geExistingTeams() {
var expected = Optional.of(buildTeam("Carolina Hurricanes"));
when(teamDao.read(1L)).thenReturn(expected);
assertThat(teamService.getTeam(1)).isEqualTo(expected);
verify(teamDao).read(1L);
}
private Team buildTeam(String name) {
var team = new Team();
team.setName(name);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment