Question: public class GalleryTest { //Review the test function below @Test void testFindPhotoWithSize() { //Generate data using the provided createGallery1() function Gallery gallery = Gallery. createGallery1

public class GalleryTest {

//Review the test function below

@Test

void testFindPhotoWithSize() {

//Generate data using the provided createGallery1() function

Gallery gallery = Gallery.createGallery1();

//gallery now contains 12 photos and 6 photographers

Photo result = gallery.findPhotoWithSize(581);

assertNotNull(result);

assertEquals(gallery.photos[0], result); //The 1st Photo object has a size of 581

assertEquals(gallery.photos[11], gallery.findPhotoWithSize(5613)); //The 11th Photo object has a size of 5613

assertEquals(null, gallery.findPhotoWithSize(6112)); //No photo objects have a size of 6112

}

//==================================

//== Place your tests below here! ==

//==================================

//TODO To be completed

// Test for photosLargerThen

// Test for findLastPhotoContaining

// Test for findPhotosContaining

//==================================

//== Do not edit the below tests! ==

//==================================

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!