3940414243444546
@Autowired private ReleaseDao dao; @Test public void getByExistingIdReturnsOneRelese() { Release release = dao.getById(1); assertThat(release.getName(), is("The Best of Rick Astley")); }
4546474849505152
assertThat(release.getName(), is("The Best of Rick Astley")); } @Test public void getByNotExistingIdReturnsNull() { Release release = dao.getById(9001); assertThat(release, is(nullValue())); }
5253545556575859
} @Test public void getByExistingGidReturnsOneRelease() { UUID gid = UUID.fromString("e1f5f807-3851-48fb-838b-fb8a069f53e7"); Release release = dao.getByGid(gid); assertThat(release.getName(), is("The Best of Rick Astley")); }
5960616263646566
} @Test public void getByNotExistingGidReturnsNull() { UUID gid = UUID.fromString("b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d"); Release release = dao.getByGid(gid); assertThat(release, is(nullValue())); }
6667686970717273
} @Test public void getByExistingRedirectedGidReturnsOneRelease() { UUID gid = UUID.fromString("5d32bacc-d62a-4e77-9f0e-d934e53d5359"); Release release = dao.getByGid(gid); assertThat(release.getName(), is("Multi-Disc Extravaganza")); }
7374757677787980
} @Test public void getByExistingGidReturnsOneReleaseThatHasNoRedirectedGids() { UUID gid = UUID.fromString("f80addb0-1f8c-3c37-a4a9-6f8867be35fe"); Release release = dao.getByGid(gid); assertThat(release.getName(), is("The Warning")); }