Skip to content

Commit

Permalink
add test for entity tag support, remove copied tests
Browse files Browse the repository at this point in the history
  • Loading branch information
crashdemons committed Feb 16, 2021
1 parent 2143405 commit 845de26
Showing 1 changed file with 5 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,13 @@ public ProviderTest() {


@Test
public void getEntityTypeFromTypename_TestLegacyPigZombie(){
Version.setDetectedServerVersion("craftbukkit", 1, 13);
System.out.println("getEntityTypeFromTypenameTest");
public void testSupportsEntityTag(){
Version.setDetectedServerVersion("craftbukkit", 1, 14);
System.out.println("testSupportsEntityTag");
CompatibilityProvider provider = new com.github.crashdemons.playerheads.compatibility.craftbukkit_1_14.Provider();
EntityType expected = EntityType.PIG_ZOMBIE;
EntityType actual = provider.getEntityTypeFromTypename("PIG_ZOMBIE");
assertEquals(expected,actual);
assertEquals(true,provider.supportsEntityTagType(true));
assertEquals(true,provider.supportsEntityTagType(false));

}
@Test
public void getEntityTypeFromTypename_TestZombifiedPiglin(){
Version.setDetectedServerVersion("craftbukkit", 1, 13);
System.out.println("getEntityTypeFromTypenameTest");
CompatibilityProvider provider = new com.github.crashdemons.playerheads.compatibility.craftbukkit_1_14.Provider();
EntityType expected = EntityType.PIG_ZOMBIE;
EntityType actual = provider.getEntityTypeFromTypename("ZOMBIFIED_PIGLIN");
assertEquals(expected,actual);
}

}

0 comments on commit 845de26

Please sign in to comment.