|
@@ -10,27 +10,30 @@ import org.junit.jupiter.api.Test;
|
|
import org.junit.jupiter.api.extension.ExtendWith;
|
|
import org.junit.jupiter.api.extension.ExtendWith;
|
|
import org.mockito.Mock;
|
|
import org.mockito.Mock;
|
|
import org.mockito.junit.jupiter.MockitoExtension;
|
|
import org.mockito.junit.jupiter.MockitoExtension;
|
|
|
|
+import scot.carricksoftware.grantswriter.domains.people.Person;
|
|
|
|
|
|
-import static org.junit.jupiter.api.Assertions.assertNotNull;
|
|
|
|
|
|
+import static org.mockito.Mockito.verify;
|
|
|
|
|
|
@ExtendWith(MockitoExtension.class)
|
|
@ExtendWith(MockitoExtension.class)
|
|
class GatherTimeLineDataTest {
|
|
class GatherTimeLineDataTest {
|
|
|
|
|
|
private GatherTimeLineData gatherTimeLineData;
|
|
private GatherTimeLineData gatherTimeLineData;
|
|
|
|
|
|
-
|
|
|
|
@Mock
|
|
@Mock
|
|
private GatherCensusTimeLineData gatherCensusTimeLineDataMock;
|
|
private GatherCensusTimeLineData gatherCensusTimeLineDataMock;
|
|
|
|
|
|
|
|
+ @Mock
|
|
|
|
+ private Person personMock;
|
|
|
|
+
|
|
@BeforeEach
|
|
@BeforeEach
|
|
void setUp() {
|
|
void setUp() {
|
|
gatherTimeLineData = new GatherTimeLineDataImpl(gatherCensusTimeLineDataMock);
|
|
gatherTimeLineData = new GatherTimeLineDataImpl(gatherCensusTimeLineDataMock);
|
|
}
|
|
}
|
|
|
|
|
|
@Test
|
|
@Test
|
|
- void constructorTest(){
|
|
|
|
- assertNotNull(gatherTimeLineData);
|
|
|
|
|
|
+ void gatherTest(){
|
|
|
|
+ gatherTimeLineData.gather(personMock);
|
|
|
|
+ verify(gatherCensusTimeLineDataMock).gather(personMock);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
}
|
|
}
|