Skip to content

Commit

Permalink
feat: cover new attributes with unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dialex committed Sep 25, 2021
1 parent 6bcb0aa commit 09936e1
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions src/test/java/com/diogonunes/jcolor/tests/unit/TestAttribute.java
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,45 @@ public void Attribute_AnsiCode_Strikethrough() {
assertThat(code, equalTo(expectedAnsiCode));
}

@Test
public void Attribute_AnsiCode_Framed() {
// ARRANGE
Attribute attribute = Attribute.FRAMED();

// ACT
String code = attribute.toString();

// ASSERT
String expectedAnsiCode = "51";
assertThat(code, equalTo(expectedAnsiCode));
}

@Test
public void Attribute_AnsiCode_Encircled() {
// ARRANGE
Attribute attribute = Attribute.ENCIRCLED();

// ACT
String code = attribute.toString();

// ASSERT
String expectedAnsiCode = "52";
assertThat(code, equalTo(expectedAnsiCode));
}

@Test
public void Attribute_AnsiCode_Overlined() {
// ARRANGE
Attribute attribute = Attribute.OVERLINED();

// ACT
String code = attribute.toString();

// ASSERT
String expectedAnsiCode = "53";
assertThat(code, equalTo(expectedAnsiCode));
}

// Colors (foreground)

@Test
Expand Down

0 comments on commit 09936e1

Please sign in to comment.