mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-09-28 23:27:30 +02:00
28 lines
658 B
Java
28 lines
658 B
Java
package com.comphenix.protocol.wrappers;
|
|
|
|
import static org.junit.Assert.assertEquals;
|
|
import static org.junit.Assert.assertNotNull;
|
|
|
|
import org.junit.BeforeClass;
|
|
import org.junit.Test;
|
|
|
|
import com.comphenix.protocol.BukkitInitialization;
|
|
|
|
public class WrappedChatComponentTest {
|
|
|
|
@BeforeClass
|
|
public static void initializeBukkit() {
|
|
BukkitInitialization.initializePackage();
|
|
}
|
|
|
|
@Test
|
|
public void testText() {
|
|
WrappedChatComponent test = WrappedChatComponent.fromText("Hello.");
|
|
String json = test.getJson();
|
|
assertNotNull(json);
|
|
|
|
WrappedChatComponent clone = WrappedChatComponent.fromJson(json);
|
|
assertEquals(json, clone.getJson());
|
|
}
|
|
}
|