Assert.assertNotNull(p.getAlbums());
Assert.assertFalse(p.getAlbums().isEmpty());
Assert.assertEquals(2, p.getAlbums().size());
AlbumUni_M_M_1_1 album1 = p.getAlbums().get(0);
Assert.assertNotNull(album1);
Assert.assertTrue(album1.getAlbumId().startsWith("album_"));
PhotoUni_M_M_1_1 photo1 = album1.getPhoto();
Assert.assertNotNull(photo1);
Assert.assertTrue(photo1.getPhotoId().startsWith("photo_"));
AlbumUni_M_M_1_1 album2 = p.getAlbums().get(1);
Assert.assertNotNull(album2);
Assert.assertTrue(album2.getAlbumId().startsWith("album_"));
PhotoUni_M_M_1_1 photo2 = album2.getPhoto();
Assert.assertNotNull(photo2);
Assert.assertTrue(photo2.getPhotoId().startsWith("photo_"));
}
else if (photographerId == 2)
{
Assert.assertNotNull(p);
Assert.assertEquals(2, p.getPhotographerId());
Assert.assertEquals("Vivek2", p.getPhotographerName());
Assert.assertNotNull(p.getAlbums());
Assert.assertFalse(p.getAlbums().isEmpty());
Assert.assertEquals(2, p.getAlbums().size());
AlbumUni_M_M_1_1 album1 = p.getAlbums().get(0);
Assert.assertNotNull(album1);
Assert.assertTrue(album1.getAlbumId().startsWith("album_"));
PhotoUni_M_M_1_1 photo1 = album1.getPhoto();
Assert.assertNotNull(photo1);
Assert.assertTrue(photo1.getPhotoId().startsWith("photo_"));
AlbumUni_M_M_1_1 album2 = p.getAlbums().get(1);
Assert.assertNotNull(album2);
Assert.assertTrue(album2.getAlbumId().startsWith("album_"));
PhotoUni_M_M_1_1 photo2 = album2.getPhoto();
Assert.assertNotNull(photo2);
Assert.assertTrue(photo2.getPhotoId().startsWith("photo_"));
}
else
{