public class Images extends Object
BufferedImage
s.Modifier and Type | Method and Description |
---|---|
void |
assertEqual(org.assertj.core.api.AssertionInfo info,
BufferedImage actual,
BufferedImage expected)
Asserts that two images are equal.
|
void |
assertEqual(org.assertj.core.api.AssertionInfo info,
BufferedImage actual,
BufferedImage expected,
org.assertj.core.data.Offset<Integer> offset)
Asserts that two images are equal.
|
void |
assertHasSize(org.assertj.core.api.AssertionInfo info,
BufferedImage actual,
Dimension size)
Asserts that the size of the given image is equal to the given size.
|
void |
assertNotEqual(org.assertj.core.api.AssertionInfo info,
BufferedImage actual,
BufferedImage other)
Asserts that two images are not equal.
|
static Images |
instance()
Returns the singleton instance of this class.
|
public static Images instance()
public void assertEqual(org.assertj.core.api.AssertionInfo info, BufferedImage actual, BufferedImage expected)
info
- contains information about the assertion.actual
- the actual image.expected
- the expected image.AssertionError
- if the actual image is not equal to the expected one.public void assertEqual(org.assertj.core.api.AssertionInfo info, BufferedImage actual, BufferedImage expected, org.assertj.core.data.Offset<Integer> offset)
info
- contains information about the assertion.actual
- the actual image.expected
- the expected image.offset
- helps decide if the color of two pixels are similar: two pixels that are identical to the human eye
may still have slightly different color values. For example, by using an offset of 1 we can indicate that
a blue value of 60 is similar to a blue value of 61.NullPointerException
- if the given offset is null
.AssertionError
- if the actual image is not equal to the expected one.public void assertNotEqual(org.assertj.core.api.AssertionInfo info, BufferedImage actual, BufferedImage other)
info
- contains information about the assertion.actual
- the given image.other
- the object to compare actual
to.AssertionError
- if actual
is equal to other
.public void assertHasSize(org.assertj.core.api.AssertionInfo info, BufferedImage actual, Dimension size)
info
- contains information about the assertion.actual
- the given image.size
- the expected size of actual
.NullPointerException
- if the given size is null
.AssertionError
- if the size of the given image is not equal to the given size.Copyright © 2014–2019 AssertJ. All rights reserved.