Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Test
- public void testSomeMethod() {
- MAlbum album = new MAlbum();
- album.setBand(band);
- album.setName("album1");
- album.setGenre(MGenre.ROCK);
- ari.insert(album);
- MSong song1 = new MSong();
- song1.setName("song1");
- MSong song2 = new MSong();
- song2.setName("song2");
- List<MSong> songs = new ArrayList<>();
- songs.add(song1);
- songs.add(song2);
- for (MSong song : songs) {
- if (song != null) {
- song.setGenre(MGenre.ROCK);
- sri.insert(song);
- }
- }
- for (MSong song : songs) {
- if (song != null) {
- MAlbumSong mAlbumSong = new MAlbumSong();
- mAlbumSong.setAlbum(album);
- mAlbumSong.setSong(song);
- sut.insert(mAlbumSong);
- }
- }
- assertNotNull(sut.getMAlbumSongWithSomeAlbumNameAndSongName(album, song1));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement