Leon Hunter 5 years ago
parent
commit
96aa0f0482

+ 9
- 0
src/main/java/rocks/zipcode/quiz3a/collections/WordCounter.java View File

@@ -0,0 +1,9 @@
1
+package rocks.zipcode.quiz3a.collections;
2
+
3
+import java.util.Map;
4
+
5
+public class WordCounter {
6
+    public static Map<String, Integer> getWordCountMap() {
7
+        return null;
8
+    }
9
+}

+ 6
- 0
src/main/java/rocks/zipcode/quiz3a/objectorientation/enums/Person.java View File

@@ -0,0 +1,6 @@
1
+package rocks.zipcode.quiz3a.objectorientation.enums;
2
+
3
+public enum Person {
4
+    private String firstName;
5
+    private String lastName;
6
+}

+ 4
- 0
src/test/java/rocks/zipcode/quiz3a/collections/bank/FindBankAccountByIdTest.java View File

@@ -0,0 +1,4 @@
1
+package rocks.zipcode.quiz3a.collections.bank;
2
+
3
+public class FindBankAccountByIdTest {
4
+}

+ 4
- 0
src/test/java/rocks/zipcode/quiz3a/collections/bank/RemoveBankAccountTest.java View File

@@ -0,0 +1,4 @@
1
+package rocks.zipcode.quiz3a.collections.bank;
2
+
3
+public class RemoveBankAccountTest {
4
+}

+ 4
- 0
src/test/java/rocks/zipcode/quiz3a/collections/bank/SetBankAccountsTest.java View File

@@ -0,0 +1,4 @@
1
+package rocks.zipcode.quiz3a.collections.bank;
2
+
3
+public class SetBankAccountsTest {
4
+}

+ 0
- 32
src/test/java/rocks/zipcode/quiz3a/collections/food/GetSpiceCountTest.java View File

@@ -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
-}

+ 4
- 0
src/test/java/rocks/zipcode/quiz3a/collections/wordcounter/GetWordCountMapTest.java View File

@@ -0,0 +1,4 @@
1
+package rocks.zipcode.quiz3a.collections.wordcounter;
2
+
3
+public class GetWordCountMapTest {
4
+}

+ 1
- 0
src/test/java/rocks/zipcode/quiz3a/objectorientation/bankaccount/BankAccountPolymorphismTest.java View File

@@ -11,6 +11,7 @@ import rocks.zipcode.quiz3a.objectorientation.account.Transactable;
11 11
  */
12 12
 public class BankAccountPolymorphismTest {
13 13
     BankAccount bankAccount = new BankAccount();
14
+
14 15
     @Test
15 16
     public void test1() {
16 17
         Assert.assertTrue(bankAccount instanceof Transactable);

+ 0
- 1
src/test/java/rocks/zipcode/quiz3a/objectorientation/employee/EmployeeConstructorTest.java View File

@@ -22,7 +22,6 @@ public class EmployeeConstructorTest {
22 22
         Double expectedHoursWorked = 0.0;
23 23
         Double expectedBalance = 0.0;
24 24
         Double expectedBankAccountBalance = 0.0;
25
-        Double expectedMoneyEarned = expectedHourlyWage * expectedHoursWorked;
26 25
 
27 26
         Assert.assertNotNull(employee.getBankAccount());
28 27
         Assert.assertEquals(expectedHourlyWage, worker.getHourlyWage());

+ 1
- 1
src/test/java/rocks/zipcode/quiz3a/objectorientation/employee/SetBankAccountTest.java View File

@@ -40,7 +40,7 @@ public class SetBankAccountTest {
40 40
         // given
41 41
         Employee employee = new Employee();
42 42
         BankAccount expected = new BankAccount();
43
-        ((Transactable)expected).setBalance(expectedBalance);
43
+        ((Transactable)expected).deposit(expectedBalance);
44 44
 
45 45
         // when
46 46
         employee.setBankAccount(expected);