package org.inventivetalent.npclib.test;

import org.bukkit.entity.EntityType;
import org.inventivetalent.npclib.NPCType;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class TypeTest {

	@Test
	public void entityTypeTest() {
		assertEquals(NPCType.ARMOR_STAND, NPCType.forEntityType(EntityType.ARMOR_STAND));
		assertEquals(NPCType.HORSE, NPCType.forEntityType(EntityType.HORSE));
	}

	@Test
	public void fromStringTest() {
		assertEquals(NPCType.CHICKEN, NPCType.fromString("chicken"));
		assertEquals(NPCType.MUSHROOM_COW, NPCType.fromString("mushroom cow"));
		assertEquals(NPCType.MUSHROOM_COW, NPCType.fromString("mushroomCow"));
		assertEquals(NPCType.SHULKER, NPCType.fromString("Shulker"));
		assertEquals(NPCType.ENDER_DRAGON, NPCType.fromString("EnderDragon"));
	}

}

@@ -183,16 +183,59 @@
 tEquals;
+%0Aimport static org.junit.Assert.assertNull;
 %0A%0Apublic
@@ -838,15 +838,114 @@
 agon%22));
+%0A%0A%09%09assertNull(NPCType.fromString(%22does not exist%22));%0A%09%09assertNull(NPCType.fromString(%22noentity%22));
 %0A%09%7D%0A%0A%7D%0A

add null test