|
@@ -1,32 +0,0 @@
|
1
|
|
-package rocks.zipcode.quiz3a.collections.food;
|
2
|
|
-
|
3
|
|
-import org.junit.Assert;
|
4
|
|
-import org.junit.Test;
|
5
|
|
-import rocks.zipcode.quiz3a.collections.Food;
|
6
|
|
-import rocks.zipcode.quiz3a.objectorientation.Ginger;
|
7
|
|
-import rocks.zipcode.quiz3a.objectorientation.Pepper;
|
8
|
|
-import rocks.zipcode.quiz3a.objectorientation.Spice;
|
9
|
|
-
|
10
|
|
-import java.util.Map;
|
11
|
|
-
|
12
|
|
-/**
|
13
|
|
- * @author leon on 27/12/2018.
|
14
|
|
- */
|
15
|
|
-public class GetSpiceCountTest {
|
16
|
|
- @Test
|
17
|
|
- public void test1() {
|
18
|
|
- // given
|
19
|
|
- Food food = new Food();
|
20
|
|
- food.applySpice((Spice)(Object)new Pepper());
|
21
|
|
- food.applySpice((Spice)(Object)new Pepper());
|
22
|
|
- food.applySpice((Spice)(Object)new Ginger());
|
23
|
|
- food.applySpice((Spice)(Object)new Ginger());
|
24
|
|
-
|
25
|
|
- // when
|
26
|
|
- Map<? extends Class<? extends Spice>, Integer> spiceCount = food.getSpiceCount((Class<? extends Spice>)(Object)Pepper.class);
|
27
|
|
- spiceCount.get(null);
|
28
|
|
-
|
29
|
|
- // then
|
30
|
|
-// Assert.assertEquals();
|
31
|
|
- }
|
32
|
|
-}
|