|
@ -1,5 +1,6 @@ |
|
|
package org.bitbiome.entitiesTest; |
|
|
package org.bitbiome.entitiesTest; |
|
|
import static org.junit.jupiter.api.Assertions.assertEquals; |
|
|
import static org.junit.jupiter.api.Assertions.assertEquals; |
|
|
|
|
|
import static org.junit.jupiter.api.Assumptions.assumeTrue; |
|
|
|
|
|
|
|
|
import org.bitbiome.entities.Item; |
|
|
import org.bitbiome.entities.Item; |
|
|
import org.junit.jupiter.api.BeforeAll; |
|
|
import org.junit.jupiter.api.BeforeAll; |
|
@ -15,6 +16,7 @@ public class ItemTest { |
|
|
item = new Item(); |
|
|
item = new Item(); |
|
|
item.setName("Unit"); |
|
|
item.setName("Unit"); |
|
|
item.setDamage(12.5F); |
|
|
item.setDamage(12.5F); |
|
|
|
|
|
item.changeDoesDamage(true); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Test |
|
|
@Test |
|
@ -26,4 +28,11 @@ public class ItemTest { |
|
|
public void testGetDamage() { |
|
|
public void testGetDamage() { |
|
|
assertEquals(12.5, item.getDamage()); |
|
|
assertEquals(12.5, item.getDamage()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
public void testDoesDamage() { |
|
|
|
|
|
boolean doesDamage = item.doesDamage(); |
|
|
|
|
|
assumeTrue(item.getDamage() > 0); |
|
|
|
|
|
assumeTrue(doesDamage); |
|
|
|
|
|
} |
|
|
} |
|
|
} |