mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-04 07:28:19 +01:00
Use assertEqualsSNBT
This commit is contained in:
parent
b5367ee96a
commit
d2e3055225
@ -4,7 +4,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static net.minestom.server.api.TestUtils.assertEqualsIgnoreSpace;
|
||||
import static net.minestom.server.api.TestUtils.assertEqualsSNBT;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
public class TagStructureTest {
|
||||
@ -71,16 +71,16 @@ public class TagStructureTest {
|
||||
var handler = TagHandler.newHandler();
|
||||
var entry = new Entry("hello");
|
||||
handler.setTag(STRUCTURE_TAG, entry);
|
||||
assertEqualsIgnoreSpace("""
|
||||
assertEqualsSNBT("""
|
||||
{
|
||||
"entry": {
|
||||
"value": "hello"
|
||||
"value":"hello"
|
||||
}
|
||||
}
|
||||
""", handler.asCompound().toSNBT());
|
||||
""", handler.asCompound());
|
||||
|
||||
handler.removeTag(STRUCTURE_TAG);
|
||||
assertEqualsIgnoreSpace("{}", handler.asCompound().toSNBT());
|
||||
assertEqualsSNBT("{}", handler.asCompound());
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -117,24 +117,24 @@ public class TagStructureTest {
|
||||
// Add first entry
|
||||
{
|
||||
handler.setTag(STRUCTURE_TAG, entry1);
|
||||
assertEqualsIgnoreSpace("""
|
||||
assertEqualsSNBT("""
|
||||
{
|
||||
"entry": {
|
||||
"value": "hello"
|
||||
"value":"hello"
|
||||
}
|
||||
}
|
||||
""", handler.asCompound().toSNBT());
|
||||
""", handler.asCompound());
|
||||
}
|
||||
// Add second entry
|
||||
{
|
||||
handler.setTag(STRUCTURE_TAG2, entry2);
|
||||
assertEqualsIgnoreSpace("""
|
||||
assertEqualsSNBT("""
|
||||
{
|
||||
"entry": {
|
||||
"value2": "hello2"
|
||||
}
|
||||
}
|
||||
""", handler.asCompound().toSNBT());
|
||||
""", handler.asCompound());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,9 +4,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static net.minestom.server.api.TestUtils.assertEqualsIgnoreSpace;
|
||||
import static net.minestom.server.api.TestUtils.assertEqualsSNBT;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
|
||||
public class TagViewTest {
|
||||
|
||||
@ -53,14 +52,14 @@ public class TagViewTest {
|
||||
var handler = TagHandler.newHandler();
|
||||
var entry = new Entry("hello");
|
||||
handler.setTag(VIEW_TAG, entry);
|
||||
assertEqualsIgnoreSpace("""
|
||||
assertEqualsSNBT("""
|
||||
{
|
||||
"value": "hello"
|
||||
"value":"hello"
|
||||
}
|
||||
""", handler.asCompound().toSNBT());
|
||||
""", handler.asCompound());
|
||||
|
||||
handler.removeTag(VIEW_TAG);
|
||||
assertEqualsIgnoreSpace("{}", handler.asCompound().toSNBT());
|
||||
assertEqualsSNBT("{}", handler.asCompound());
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user