You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
469 B
27 lines
469 B
package de.hs_fulda.ciip.projjpn;
|
|
|
|
import junit.framework.TestCase;
|
|
|
|
public class ItemTest extends TestCase {
|
|
public void test_ItemNotInStock() {
|
|
// Given
|
|
Item item = new Item();
|
|
|
|
// When
|
|
boolean notInStock = item.inStock();
|
|
|
|
// Then
|
|
assertFalse(notInStock);
|
|
}
|
|
|
|
public void test_ItemInStock() {
|
|
// Given
|
|
Item item = new Item();
|
|
item.updateAvailability(1);
|
|
// When
|
|
boolean inStock = item.inStock();
|
|
|
|
// Then
|
|
assertTrue(inStock);
|
|
}
|
|
}
|