|
@@ -0,0 +1,29 @@
|
|
1
|
+package com.zipcodewilmington.froilansfarm;
|
|
2
|
+
|
|
3
|
+import org.junit.Assert;
|
|
4
|
+import org.junit.Before;
|
|
5
|
+import org.junit.Test;
|
|
6
|
+import com.zipcodewilmington.froilansfarm.Holders.Farm;
|
|
7
|
+
|
|
8
|
+public class SaturdayTest {
|
|
9
|
+ Farm farm;
|
|
10
|
+ int eggFirstCount;
|
|
11
|
+
|
|
12
|
+ @Before
|
|
13
|
+ public void setup(){
|
|
14
|
+ farm = new Farm();
|
|
15
|
+ farm.populateFarm();
|
|
16
|
+ farm.morningRoutine();
|
|
17
|
+ eggFirstCount = farm.getEgg().getFoodCount();
|
|
18
|
+ }
|
|
19
|
+
|
|
20
|
+ @Test
|
|
21
|
+ public void collectEggTest(){
|
|
22
|
+ farm.getFroilanda().collectEggs(farm.getEgg(), farm.getCoop1().getCoopCount());
|
|
23
|
+ int secondEggCount = farm.getEgg().getFoodCount();
|
|
24
|
+ int expected = 4;
|
|
25
|
+ int actual = secondEggCount-eggFirstCount;
|
|
26
|
+ Assert.assertEquals(expected,actual);
|
|
27
|
+ }
|
|
28
|
+
|
|
29
|
+}
|