List<PhotoUni_M_1_1_M> albumPhotos = album.getPhotos();
Assert.assertNotNull(albumPhotos);
Assert.assertFalse(albumPhotos.isEmpty());
Assert.assertEquals(3, albumPhotos.size());
PhotoUni_M_1_1_M photo1 = albumPhotos.get(0);
PhotoUni_M_1_1_M photo2 = albumPhotos.get(1);
PhotoUni_M_1_1_M photo3 = albumPhotos.get(2);
Assert.assertNotNull(photo1);
Assert.assertTrue(photo1.getPhotoId().startsWith("photo_"));
Assert.assertNotNull(photo2);
Assert.assertTrue(photo2.getPhotoId().startsWith("photo_"));
Assert.assertNotNull(photo3);
Assert.assertTrue(photo3.getPhotoId().startsWith("photo_"));
}
else if (photographerId == 2)
{
Assert.assertNotNull(p);
Assert.assertEquals(2, p.getPhotographerId());
Assert.assertEquals("Vivek2", p.getPhotographerName());
Assert.assertNotNull(p.getAlbum());
AlbumUni_M_1_1_M album = p.getAlbum();
Assert.assertNotNull(album);
Assert.assertTrue(album.getAlbumId().equals("album_1"));
Assert.assertEquals("My Phuket Vacation", album.getAlbumName());
Assert.assertEquals("Went Phuket with friends", album.getAlbumDescription());
List<PhotoUni_M_1_1_M> albumPhotos = album.getPhotos();
Assert.assertNotNull(albumPhotos);
Assert.assertFalse(albumPhotos.isEmpty());
Assert.assertEquals(3, albumPhotos.size());
PhotoUni_M_1_1_M photo1 = albumPhotos.get(0);
PhotoUni_M_1_1_M photo2 = albumPhotos.get(1);
PhotoUni_M_1_1_M photo3 = albumPhotos.get(2);
Assert.assertNotNull(photo1);
Assert.assertTrue(photo1.getPhotoId().startsWith("photo_"));
Assert.assertNotNull(photo2);
Assert.assertTrue(photo2.getPhotoId().startsWith("photo_"));
Assert.assertNotNull(photo3);
Assert.assertTrue(photo3.getPhotoId().startsWith("photo_"));
}
else
{
Assert.fail("Invalid Photographer ID: " + photographerId);
}