package org.inventivetalent.nbt.test;

import org.inventivetalent.nbt.*;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class TypeTest {

	@Test
	public void idForClassTest() {
		assertEquals(TagID.TAG_STRING, TagID.forClass(StringTag.class));
		assertEquals(TagID.TAG_COMPOUND, TagID.forClass(CompoundTag.class));
		assertEquals(TagID.TAG_INT_ARRAY, TagID.forClass(IntArrayTag.class));
	}

	@Test
	public void idForNameTest() {
		assertEquals(TagID.TAG_STRING, TagID.forName("StringTag"));
		assertEquals(TagID.TAG_STRING, TagID.forName("TAG_String"));
		assertEquals(TagID.TAG_COMPOUND, TagID.forName("TAG_Compound"));
		assertEquals(TagID.TAG_LONG, TagID.forName("LongTag"));
	}

	@Test
	public void classForIdTest() {
		assertEquals(DoubleTag.class, NBTTag.forType(TagID.TAG_DOUBLE));
		assertEquals(CompoundTag.class, NBTTag.forType(TagID.TAG_COMPOUND));
		assertEquals(LongTag.class, NBTTag.forType(TagID.TAG_LONG));
	}

}

@@ -698,32 +698,635 @@
 LongTag%22));%0A%09%7D%0A%0A
+%09@Test%0A%09public void idForValueClassTest() %7B%0A%09%09assertEquals(TagID.TAG_BYTE, TagID.forValueClass(byte.class));%0A%09%09assertEquals(TagID.TAG_BYTE, TagID.forValueClass(Byte.class));%0A%0A%09%09assertEquals(TagID.TAG_LONG, TagID.forValueClass(long.class));%0A%09%09assertEquals(TagID.TAG_LONG, TagID.forValueClass(Long.class));%0A%0A%09%09assertEquals(TagID.TAG_BYTE_ARRAY, TagID.forValueClass(byte%5B%5D.class));%0A%09%09assertEquals(TagID.TAG_BYTE_ARRAY, TagID.forValueClass(Byte%5B%5D.class));%0A%0A%09%09assertEquals(TagID.TAG_INT_ARRAY, TagID.forValueClass(int%5B%5D.class));%0A%09%09assertEquals(TagID.TAG_INT_ARRAY, TagID.forValueClass(Integer%5B%5D.class));%0A%09%7D%0A%0A
 %09@Test%0A%09public v

add test