• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In
Build has been canceled!

skuzzle / snapshot-tests / 1

12 Feb 2025 03:38PM UTC coverage: 86.61% (+0.03%) from 86.577%
1

Pull #109

jenkins

skuzzle
Remove old file after merge
Pull Request #109: 2.0 dev

1947 of 2248 relevant lines covered (86.61%)

0.87 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

97.06
/../snapshot-tests-core/src/main/java/de/skuzzle/test/snapshots/impl/SnapshotAssertionInput.java
1
package de.skuzzle.test.snapshots.impl;
2

3
import de.skuzzle.difftool.DiffRenderer;
4
import de.skuzzle.test.snapshots.ContextFiles;
5
import de.skuzzle.test.snapshots.SnapshotFile;
6

7
/**
8
 * Holds all the input that is required to execute a single terminal snapshot operation.
9
 * These information are resolved from the values configured via the DSL as well as
10
 * contextual information from the surrounding test method and test class.
11
 * <p>
12
 * Instances are created from {@link SnapshotDslResult#createAssertionInput()}.
13
 *
14
 * @author Simon
15
 * @since 1.8.0
16
 */
17
final class SnapshotAssertionInput {
18

19
    private final String snapshotName;
20
    private final ContextFiles contextFiles;
21
    private final SnapshotFile actualSnapshotFile;
22
    private final boolean actualWasNull;
23
    private final boolean forceUpdateSnapshots;
24
    private final boolean snapshotFileAlreadyExists;
25
    private final boolean disableAssertion;
26
    private final boolean alwaysPersistActualResult;
27
    private final boolean alwaysPersistRawResult;
28
    private final boolean persistActualResultOnFailure;
29
    private final boolean persistRawResultOnFailure;
30
    private final int lineNumberOffset;
31
    private final int contextLines;
32
    private final DiffRenderer diffRenderer;
33

34
    SnapshotAssertionInput(String snapshotName,
35
            ContextFiles contextFiles,
36
            SnapshotFile actualSnapshotFile,
37
            boolean actualWasNull,
38
            boolean disableAssertion,
39
            boolean forceUpdateSnapshots,
40
            boolean snapshotFileAlreadyExists,
41
            boolean alwaysPersistActualResult,
42
            boolean alwaysPersistRawResult,
43
            boolean persistActualResultOnFailure,
44
            boolean persistRawResultOnFailure,
45
            int lineNumberOffset,
46
            int contextLines,
47
            DiffRenderer diffRenderer) {
1✔
48
        this.snapshotName = snapshotName;
1✔
49
        this.contextFiles = contextFiles;
1✔
50
        this.actualWasNull = actualWasNull;
1✔
51
        this.forceUpdateSnapshots = forceUpdateSnapshots;
1✔
52
        this.snapshotFileAlreadyExists = snapshotFileAlreadyExists;
1✔
53
        this.disableAssertion = disableAssertion;
1✔
54
        this.alwaysPersistActualResult = alwaysPersistActualResult;
1✔
55
        this.alwaysPersistRawResult = alwaysPersistRawResult;
1✔
56
        this.actualSnapshotFile = actualSnapshotFile;
1✔
57
        this.persistActualResultOnFailure = persistActualResultOnFailure;
1✔
58
        this.persistRawResultOnFailure = persistRawResultOnFailure;
1✔
59
        this.lineNumberOffset = lineNumberOffset;
1✔
60
        this.contextLines = contextLines;
1✔
61
        this.diffRenderer = diffRenderer;
1✔
62
    }
1✔
63

64
    public boolean actualWasNull() {
65
        return actualWasNull;
1✔
66
    }
67

68
    public SnapshotFile actualSnapshotFile() {
69
        return actualSnapshotFile;
1✔
70
    }
71

72
    public String snapshotName() {
73
        return snapshotName;
×
74
    }
75

76
    public ContextFiles contextFiles() {
77
        return contextFiles;
1✔
78
    }
79

80
    public boolean isForceUpdateSnapshots() {
81
        return forceUpdateSnapshots;
1✔
82
    }
83

84
    public boolean isSnapshotFileAlreadyExists() {
85
        return snapshotFileAlreadyExists;
1✔
86
    }
87

88
    public boolean isDisableAssertion() {
89
        return disableAssertion;
1✔
90
    }
91

92
    public boolean isAlwaysPersistActualResult() {
93
        return alwaysPersistActualResult;
1✔
94
    }
95

96
    public boolean isPersistActualResultOnFailure() {
97
        return persistActualResultOnFailure;
1✔
98
    }
99

100
    public boolean isPersistRawResultOnFailure() {
101
        return persistRawResultOnFailure;
1✔
102
    }
103

104
    public boolean isAlwaysPersistRawResult() {
105
        return alwaysPersistRawResult;
1✔
106
    }
107

108
    public int lineNumberOffset() {
109
        return lineNumberOffset;
1✔
110
    }
111

112
    public int contextLines() {
113
        return contextLines;
1✔
114
    }
115

116
    public DiffRenderer diffRenderer() {
117
        return diffRenderer;
1✔
118
    }
119

120
    enum TerminalOperation {
1✔
121
        ASSERT,
1✔
122
        DISABLE,
1✔
123
        FORCE_UPDATE
1✔
124
    }
125

126
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc