новый компонент: Text
This commit is contained in:
30
protocol/src/test/java/mc/protocol/model/text/TextTest.java
Normal file
30
protocol/src/test/java/mc/protocol/model/text/TextTest.java
Normal file
@@ -0,0 +1,30 @@
|
||||
package mc.protocol.model.text;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class TextTest {
|
||||
|
||||
@Test
|
||||
void emptyTest() {
|
||||
Text actual = Text.builder().build();
|
||||
Text expected = Text.EMPTY;
|
||||
|
||||
assertEquals(expected, actual);
|
||||
}
|
||||
|
||||
@Test
|
||||
void contentTest() {
|
||||
Text actual;
|
||||
Text expected;
|
||||
|
||||
actual = Text.builder().append("123").build();
|
||||
expected = new Text("123");
|
||||
assertEquals(expected, actual);
|
||||
|
||||
actual = Text.builder().append("123").append("456").build();
|
||||
expected = new Text("123456");
|
||||
assertEquals(expected, actual);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user