Skip to content

Commit

Permalink
test(chat): isEmpty of ComponentStyle
Browse files Browse the repository at this point in the history
  • Loading branch information
diogotcorreia committed Feb 1, 2024
1 parent 37f37e3 commit 1095ff6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions chat/src/test/java/net/md_5/bungee/api/chat/ComponentsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,18 @@ public void testHasFormatting()
assertTrue( component.hasFormatting() );
}

@Test
public void testStyleIsEmpty()
{
ComponentStyle style = ComponentStyle.builder().build();
assertTrue( style.isEmpty() );

style = ComponentStyle.builder()
.bold( true )
.build();
assertFalse( style.isEmpty() );
}

/*
* In legacy chat, colors and reset both reset all formatting.
* Make sure it works in combination with ComponentBuilder.
Expand Down

0 comments on commit 1095ff6

Please sign in to comment.