@Test public void testGetSpawnedItemByLevel() { Item item = wr.path("items/spawner").queryParam("level", "25").get(Item.class); Assert.assertEquals("MyBracer", item.getName()); Assert.assertEquals("Bracer", item.getSlot()); Assert.assertEquals(Integer.valueOf(25), item.getLevel()); }
@Test public void testGetItemById() { Item item = wr.path("items/5000000").get(ClientResponse.class).getEntity(Item.class); Assert.assertEquals(Long.valueOf(5000000L), item.getId()); Assert.assertEquals("MyBracer", item.getName()); Assert.assertEquals("Bracer", item.getSlot()); Assert.assertEquals(Double.valueOf(1600.0), item.getMindamage()); Assert.assertEquals(Double.valueOf(1450.0), item.getMaxdamage()); Assert.assertEquals(Double.valueOf(90.0), item.getCritchance()); Assert.assertEquals(Integer.valueOf(2), item.getAtkspeed()); Assert.assertEquals(Double.valueOf(99.9), item.getDefense()); Assert.assertEquals(Double.valueOf(99.8), item.getAbsorption()); Assert.assertEquals(Double.valueOf(99.7), item.getBlockchance()); Assert.assertEquals(Integer.valueOf(30), item.getLevel()); }
@Test public void testGetSpawnedItemBySlot() { Item item = wr.path("items/spawner").queryParam("slot", "Bracer").get(Item.class); Assert.assertEquals("MyBracer", item.getName()); Assert.assertEquals("Bracer", item.getSlot()); }