コード例 #1
0
 public void testGetDoseShouldReturnDose() {
   // GIVEN
   final GatheredLostItem underTest = new GatheredLostItem(ID, 0, 3, false);
   // WHEN
   final int returned = underTest.getDose();
   // THEN
   Assert.assertEquals(returned, 3);
 }
コード例 #2
0
 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);
 }
コード例 #3
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);
 }