src/nl/knokko/gui/testing/GuiTestHelper.java
/**
	 * Find the ImageShowingComponent that is closest to (the parameter) from and
	 * checks if it displays the given image. If it doesn't, a TestException will be
	 * thrown. The amount parameter must equal the total amount of images that are
	 * currently shown in the application. If the found number of image showing
	 * components does not equal this amount, this method will retry for a while
	 * until the amount of found image showing components equals the given amount.
	 * If they are still not equal at the end, a TestException will be thrown.
	 * 
	 * @param from   The point to find the nearest image from
	 * @param image  The image that should be shown by the nearest image showing
	 *               component to from
	 * @param amount The total number of images shown by the application
	 */
Find the ImageShowingComponent that is closest to (the parameter) from and
checks if it displays the given image. If it doesn't, a TestException will be
thrown. The amount parameter must equal the total amount of images that are
currently shown in the application. If the found number of image showing
components does not equal this amount, this method will retry for a while
until the amount of found image showing components equals the given amount.
If they are still not equal at the end, a TestException will be thrown.

@param from   The point to find the nearest image from
@param image  The image that should be shown by the nearest image showing
component to from
@param amount The total number of images shown by the application
Find the ImageShowingComponent that is closest to ( the parameter ) from and checks if it displays the given image . If it doesn ' t a TestException will be thrown . The amount parameter must equal the total amount of images that are currently shown in the application . If the found number of image showing components does not equal this amount this method will retry for a while until the amount of found image showing components equals the given amount . If they are still not equal at the end a TestException will be thrown . @param from The point to find the nearest image from @param image The image that should be shown by the nearest image showing component to from @param amount The total number of images shown by the application
public void assertNearestImage(Point2D.Float from, BufferedImage image, int amount) {
		Collection<BufferedImage> shownImages = getNearestImage(from, amount).getComponent().getShownImages();
		for (BufferedImage shownImage : shownImages) {
			if (compareImages(image, shownImage)) {
				return;
			}
		}
		throw new TestException("The nearest image showing component to from doesn't show the given image");
	}
public void assertNearestImage ( Point2D . Float from , BufferedImage image , int amount ) { Collection < BufferedImage > shownImages = getNearestImage ( from , amount ) . getComponent ( ) . getShownImages ( ) ; for ( BufferedImage shownImage : shownImages ) { if ( compareImages ( image , shownImage ) ) { return ; } } throw new TestException ( "The nearest image showing component to from doesn't show the given image" ) ; }
Find the ImageShowingComponent that is closest to (the parameter) from and
 checks if it displays the given image.
Find the ImageShowingComponent that is closest to ( the parameter ) from and checks if it displays the given image .