@@ -0,0 +1,2192 @@
+package org.inventivetalent.nbt.test;%0A%0Aimport org.inventivetalent.nbt.CompoundTag;%0Aimport org.inventivetalent.nbt.ListTag;%0Aimport org.inventivetalent.nbt.annotation.AnnotatedNBTHandler;%0Aimport org.inventivetalent.nbt.annotation.NBT;%0Aimport org.inventivetalent.nbt.stream.NBTInputStream;%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertTrue;%0A%0Apublic class AnnotationTest %7B%0A%0A%09private final AnnotatedNBTHandler nbtHandler = new AnnotatedNBTHandler(this);%0A%0A%09@NBT(%22name%22)%0A%09public String helloWorldName;%0A%09boolean helloWorldNameCalled;%0A%0A%09@NBT(%7B%0A%09%09%09%09 %22nested compound test%22,%0A%09%09%09%09 %22egg%22,%0A%09%09%09%09 %22name%22 %7D)%0A%09public String nestedEggName;%0A%09boolean nestedEggCalled;%0A%09boolean nestedHamCalled;%0A%09boolean listCalled;%0A%0A%09@NBT(%22name%22)%0A%09public void helloWorldName(@NBT String name) %7B%0A%09%09helloWorldNameCalled = true;%0A%09%09assertEquals(%22Bananrama%22, name);%0A%09%7D%0A%0A%09@NBT(%7B%0A%09%09%09%09 %22nested compound test%22,%0A%09%09%09%09 %22egg%22 %7D)%0A%09public void nestedEgg(@NBT(%22name%22) String name, @NBT(%22value%22) float value) %7B%0A%09%09nestedEggCalled = true;%0A%09%09assertEquals(%22Eggbert%22, name);%0A%09%09assertEquals(0.5, value, 0);%0A%09%7D%0A%0A%09@NBT(%7B%0A%09%09%09%09 %22nested compound test%22,%0A%09%09%09%09 %22ham%22 %7D)%0A%09public void nestedHam(@NBT(%22name%22) String name, @NBT(%22value%22) float value) %7B%0A%09%09nestedHamCalled = true;%0A%09%09assertEquals(%22Hampus%22, name);%0A%09%09assertEquals(0.75, value, 0);%0A%09%7D%0A%0A%09@NBT(%22listTest (long)%22)%0A%09public void list(@NBT ListTag listTag) %7B%0A%09%09listCalled = true;%0A%09%09assertEquals(5, listTag.size());%0A%09%7D%0A%0A%09@Test%0A%09public void uncompressedReadTest() throws Exception %7B%0A%09%09try (NBTInputStream in = new NBTInputStream(StreamTest.class.getResourceAsStream(%22/hello_world.nbt%22))) %7B%0A%09%09%09CompoundTag tag = (CompoundTag) in.readNBTTag();%0A%09%09%09nbtHandler.onRead(tag);%0A%09%09%7D%0A%0A%09%09assertEquals(%22Bananrama%22, helloWorldName);%0A%09%09assertTrue(helloWorldNameCalled);%0A%09%7D%0A%0A%09@Test%0A%09public void compressedReadTest() throws Exception %7B%0A%09%09try (NBTInputStream in = new NBTInputStream(StreamTest.class.getResourceAsStream(%22/bigtest.nbt%22), true)) %7B%0A%09%09%09CompoundTag tag = (CompoundTag) in.readNBTTag();%0A%09%09%09nbtHandler.onRead(tag);%0A%0A%09%09%09assertEquals(%22Eggbert%22, nestedEggName);%0A%09%09%09assertTrue(nestedEggCalled);%0A%09%09%09assertTrue(nestedHamCalled);%0A%09%09%09assertTrue(listCalled);%0A%09%09%7D%0A%09%7D%0A%0A%7D%0A

add annotation tests