3637383940414243
@Autowired private RecordingDao dao; @Test public void getByExistingIdReturnsOneRecording() { Recording recording = dao.getById(1); assertThat(recording.getName(), is("The Saint")); }
4243444546474849
assertThat(recording.getName(), is("The Saint")); } @Test public void getByNotExistingIdReturnsNull() { Recording recording = dao.getById(9001); assertThat(recording, is(nullValue())); }
4950515253545556
} @Test public void getByExistingGidReturnsOneRecording() { UUID gid = UUID.fromString("4ea1383f-aca7-4a39-9839-576cf3af438b"); Recording recording = dao.getByGid(gid); assertThat(recording.getName(), is("The Saint")); }
5657585960616263
} @Test public void getByNotExistingGidReturnsNull() { UUID gid = UUID.fromString("b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d"); Recording recording = dao.getByGid(gid); assertThat(recording, is(nullValue())); }
6364656667686970
} @Test public void getByExistingGidReturnsOneRecordingThatHasNoRedirectedGids() { UUID gid = UUID.fromString("2ea1383f-aca7-4a39-9839-576cf3af438b"); Recording recording = dao.getByGid(gid); assertThat(recording.getName(), is("The Sinner")); }