public void testIsUnequippedOnlyWhenUnequippedOnlyShouldReturnTrue() { // GIVEN final GatheredLostItem underTest = new GatheredLostItem(ID, TEST_AMOUNT, 0, true); // WHEN final boolean returned = underTest.isUnequippedOnly(); // THEN Assert.assertTrue(returned); }
public void testGetDoseShouldReturnDose() { // GIVEN final GatheredLostItem underTest = new GatheredLostItem(ID, 0, 3, false); // WHEN final int returned = underTest.getDose(); // THEN Assert.assertEquals(returned, 3); }
public void testGetAmountShouldReturnAmount() { // GIVEN final GatheredLostItem underTest = new GatheredLostItem(ID, TEST_AMOUNT, 0, false); // WHEN final int returned = underTest.getAmount(); // THEN Assert.assertEquals(returned, TEST_AMOUNT); }
public void testGetIdShouldReturnId() { // GIVEN final GatheredLostItem underTest = new GatheredLostItem(ID, TEST_AMOUNT, 0, false); // WHEN final String returned = underTest.getId(); // THEN Assert.assertEquals(returned, ID); }
public void testConstructorDefaultOneShouldCreateEmptyObject() { // GIVEN // WHEN final GatheredLostItem returned = new GatheredLostItem(); // THEN Assert.assertEquals(returned.getAmount(), 0); Assert.assertEquals(returned.getId(), ""); Assert.assertEquals(returned.getDose(), 0); }
public void testCloneShouldReturnClonedItem() throws CloneNotSupportedException { // GIVEN final GatheredLostItem underTest = new GatheredLostItem(ID, TEST_AMOUNT, 0, false); // WHEN final GatheredLostItem returned = underTest.clone(); // THEN Assert.assertEquals(returned.getId(), ID); Assert.assertEquals(returned.getAmount(), TEST_AMOUNT); Assert.assertEquals(returned.getDose(), 0); }