|
@@ -21,7 +21,8 @@ public class ItemParser {
|
21
|
21
|
|
22
|
22
|
public Item parseStringIntoItem(String rawItem) throws ItemParseException {
|
23
|
23
|
|
24
|
|
- if (findName(rawItem) == null || findPrice(rawItem) == null) {
|
|
24
|
+ if (findName(rawItem) == null || findPrice(rawItem) == null ||
|
|
25
|
+ findType(rawItem) == null || findExpiration(rawItem) == null) {
|
25
|
26
|
throw new ItemParseException();
|
26
|
27
|
}
|
27
|
28
|
|