-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add equals and toString tests for new classes
- Loading branch information
1 parent
65a5d13
commit ba3a902
Showing
3 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/test/java/com/opencastsoftware/prettier4j/ansi/ColorTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* SPDX-FileCopyrightText: © 2024 Opencast Software Europe Ltd <https://opencastsoftware.com> | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
package com.opencastsoftware.prettier4j.ansi; | ||
|
||
import com.jparams.verifier.tostring.ToStringVerifier; | ||
import nl.jqno.equalsverifier.EqualsVerifier; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class ColorTest { | ||
@Test | ||
void testEquals() { | ||
EqualsVerifier.forClasses( | ||
Color.class, Color16.class, | ||
Color256.class, ColorRgb.class) | ||
.usingGetClass().verify(); | ||
} | ||
|
||
@Test | ||
void testToString() { | ||
ToStringVerifier.forClasses(Color16.class, Color256.class, ColorRgb.class).verify(); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/test/java/com/opencastsoftware/prettier4j/ansi/StylesTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.opencastsoftware.prettier4j.ansi; | ||
|
||
import com.jparams.verifier.tostring.ToStringVerifier; | ||
import nl.jqno.equalsverifier.EqualsVerifier; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class StylesTest { | ||
@Test | ||
void testEquals() { | ||
EqualsVerifier.forClasses(Styles.Fg.class, Styles.Bg.class) | ||
.usingGetClass() | ||
.verify(); | ||
} | ||
|
||
@Test | ||
void testToString() { | ||
ToStringVerifier.forClasses( | ||
Styles.Fg.class, Styles.Bg.class, Styles.Bold.class, | ||
Styles.Faint.class, Styles.Italic.class, Styles.Underline.class, | ||
Styles.Blink.class, Styles.Inverse.class, Styles.Strikethrough.class) | ||
.withIgnoredFields("shiftValue").verify(); | ||
} | ||
} |