Example usage for javax.imageio ImageReader equals

List of usage examples for javax.imageio ImageReader equals

Introduction

In this page you can find the example usage for javax.imageio ImageReader equals.

Prototype

public boolean equals(Object obj) 

Source Link

Document

Indicates whether some other object is "equal to" this one.

Usage

From source file:com.gargoylesoftware.htmlunit.html.HtmlImageDownloadTest.java

/**
 * The image should be redownloaded when the src attribute changes.
 * @throws Exception if the test fails//from w  ww.  j a  va  2 s.c om
 */
@Test
public void redownloadOnSrcAttributeChanged() throws Exception {
    final HtmlImage htmlimage = getHtmlElementToTest("image1");
    final ImageReader imagereader = htmlimage.getImageReader();
    htmlimage.setAttribute("src", htmlimage.getAttribute("src") + "#changed");
    assertFalse("Src attribute changed but ImageReader was not reloaded",
            imagereader.equals(htmlimage.getImageReader()));
}