Package org.carrot2.labs.test
Class BufferedImageAssertion
java.lang.Object
org.carrot2.labs.test.BufferedImageAssertion
Assertions on instances of
CssProperty
.-
Constructor Summary
ConstructorsConstructorDescriptionBufferedImageAssertion
(BufferedImage actual) Creates aBufferedImage
assertion. -
Method Summary
Modifier and TypeMethodDescriptionAs.Asserts that the image has or doesn't have any transparent areas.Asserts that the image has bit (0/1) alpha areas.hasNumberOfColorsEqualTo
(int colors) Asserts that the image has the specified number of colors, fully transparent pixels are not counted.Checks for size.Asserts that the image has true (0..1) alpha areas.Asserts that the image is a direct color image.isEqualTo
(BufferedImage expected) Checks if is equal to.Asserts that the image is an indexed color image.isNotEqualTo
(BufferedImage expected) Checks if is not equal to.
-
Constructor Details
-
BufferedImageAssertion
Creates aBufferedImage
assertion.- Parameters:
actual
- the actual
-
-
Method Details
-
isIndexedColor
Asserts that the image is an indexed color image.- Returns:
- the buffered image assertion
-
isDirectColor
Asserts that the image is a direct color image.- Returns:
- the buffered image assertion
-
hasBitAlpha
Asserts that the image has bit (0/1) alpha areas.- Returns:
- the buffered image assertion
-
hasTrueAlpha
Asserts that the image has true (0..1) alpha areas.- Returns:
- the buffered image assertion
-
doesNotHaveAlpha
Asserts that the image has or doesn't have any transparent areas.- Returns:
- the buffered image assertion
-
hasNumberOfColorsEqualTo
Asserts that the image has the specified number of colors, fully transparent pixels are not counted.- Parameters:
colors
- the colors- Returns:
- the buffered image assertion
-
isEqualTo
Checks if is equal to.- Parameters:
expected
- the expected- Returns:
- the buffered image assertion
-
isNotEqualTo
Checks if is not equal to.- Parameters:
expected
- the expected- Returns:
- the buffered image assertion
-
as
As.- Parameters:
description
- the description- Returns:
- the buffered image assertion
-
hasSize
Checks for size.- Parameters:
dimension
- the dimension- Returns:
- the buffered image assertion
-