|
@ -51,8 +51,15 @@ public class ItemTest extends TestCase { |
|
|
String expectedDescription = "Gaming Maus fuer Fortgeschrittene."; |
|
|
String expectedDescription = "Gaming Maus fuer Fortgeschrittene."; |
|
|
int expectedQuantity = 10; |
|
|
int expectedQuantity = 10; |
|
|
float expectedPrice = 69.99f; |
|
|
float expectedPrice = 69.99f; |
|
|
Item item = new Item(expectedTitel, expectedDescription, expectedQuantity, expectedPrice); |
|
|
|
|
|
|
|
|
|
|
|
assertNotNull(item); |
|
|
|
|
|
|
|
|
// When |
|
|
|
|
|
Item itemNotNull = new Item(expectedTitel, expectedDescription, expectedQuantity, expectedPrice); |
|
|
|
|
|
|
|
|
|
|
|
// Then |
|
|
|
|
|
assertNotNull(itemNotNull); |
|
|
|
|
|
|
|
|
|
|
|
// When |
|
|
|
|
|
boolean validDescription = itemNotNull.getDescription().equals(expectedDescription); |
|
|
|
|
|
assertTrue(validDescription); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |