Browse Source

Added: Javadoc for test_insertItemInWarehouse()

feature-pr/shop
Maxim Volkov 3 years ago
parent
commit
2b8a628c60
  1. 11
      projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java

11
projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java

@ -3,12 +3,9 @@ package de.hs_fulda.ciip.projjpn;
import junit.framework.TestCase; import junit.framework.TestCase;
public class WarehouseTest extends TestCase { public class WarehouseTest extends TestCase {
/*
* public void test_fillWareHouseWithItems() { for (int i = 0; i < 10; i++) {
*
* } }
/**
* Check if the insertion of an Item works properly.
*/ */
public void test_insertItemInWarehouse() { public void test_insertItemInWarehouse() {
// Given // Given
Warehouse warehouse = new Warehouse(); Warehouse warehouse = new Warehouse();
@ -37,7 +34,7 @@ public class WarehouseTest extends TestCase {
Warehouse warehouse = new Warehouse(); Warehouse warehouse = new Warehouse();
int unitsPerItemType = 3; int unitsPerItemType = 3;
int expectedSize = 13; int expectedSize = 13;
for(int i = 0; i < expectedSize; i++) {
for (int i = 0; i < expectedSize; i++) {
Item item = new Item("ItemDummy" + i, "DescriptionDummy" + i, unitsPerItemType, 12.0f); Item item = new Item("ItemDummy" + i, "DescriptionDummy" + i, unitsPerItemType, 12.0f);
warehouse.insertItem(item); warehouse.insertItem(item);
} }
@ -51,7 +48,7 @@ public class WarehouseTest extends TestCase {
/** /**
* Empty Warehouse means there are a total of zero Items. * Empty Warehouse means there are a total of zero Items.
*/ */
public void test_emptyWarehouse() {
public void test_emptyWarehouse() {
// Given // Given
Warehouse warehouse = new Warehouse(); Warehouse warehouse = new Warehouse();

Loading…
Cancel
Save