SnapshotEntry
final class SnapshotEntry
Package: dev.joid.test.snapshot · Module: tool-testkit · Source: SnapshotEntry.java
One shot of a snapshot report: its name, its status, its different pixels and its two files.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
SnapshotEntry | of(String name, SnapshotStatus status, int pixels, File render, File reference) factory | Returns the entry of that shot. |
SnapshotEntry | compare(String name, SnapshotImage actual, File render, File reference, int tolerance, String against, List | Compares the image with the reference file at that tolerance, adds a message to the list of failures when they differ, and returns the entry. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
String | getName() | Returns the name of the shot. |
SnapshotStatus | getStatus() | Returns the status of the shot. |
int | getPixels() | Returns the number of different pixels. |
File | getRender() | Returns the file of the render. |
File | getReference() | Returns the file of the reference. |
Creation details
Section titled “Creation details”SnapshotEntry of(String name, SnapshotStatus status, int pixels, File render, File reference) factory
Returns the entry of that shot.
compare
Section titled “compare”SnapshotEntry compare(String name, SnapshotImage actual, File render, File reference, int tolerance, String against, List<String> failures) factory
Compares the image with the reference file at that tolerance, adds a message to the list of failures when they differ, and returns the entry.
Method details
Section titled “Method details”getName
Section titled “getName”String getName()
Returns the name of the shot.
getStatus
Section titled “getStatus”SnapshotStatus getStatus()
Returns the status of the shot.
getPixels
Section titled “getPixels”int getPixels()
Returns the number of different pixels.
getRender
Section titled “getRender”File getRender()
Returns the file of the render.
getReference
Section titled “getReference”File getReference()
Returns the file of the reference.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
