Line | |
---|
1 | package exampleagentstest;
|
---|
2 |
|
---|
3 | import static org.mockito.Mockito.mock;
|
---|
4 | import static org.mockito.Mockito.when;
|
---|
5 |
|
---|
6 | import java.io.IOException;
|
---|
7 |
|
---|
8 | import org.junit.Before;
|
---|
9 |
|
---|
10 | import genius.core.exceptions.InstantiateException;
|
---|
11 | import genius.core.persistent.PersistentDataType;
|
---|
12 | import genius.core.persistent.StandardInfoList;
|
---|
13 | import storageexample.GroupX;
|
---|
14 |
|
---|
15 | public class StorageExampleTest extends AgentTest {
|
---|
16 |
|
---|
17 | @Override
|
---|
18 | @Before
|
---|
19 | public void before() throws InstantiateException, IOException {
|
---|
20 | super.before();
|
---|
21 |
|
---|
22 | // persistent data neeeded for some tests.
|
---|
23 | when(persistentData.getPersistentDataType())
|
---|
24 | .thenReturn(PersistentDataType.STANDARD);
|
---|
25 |
|
---|
26 | StandardInfoList standardInfoList = mock(StandardInfoList.class);
|
---|
27 | when(standardInfoList.isEmpty()).thenReturn(true);
|
---|
28 | when(persistentData.get()).thenReturn(standardInfoList);
|
---|
29 | }
|
---|
30 |
|
---|
31 | public StorageExampleTest() {
|
---|
32 | super(GroupX.class);
|
---|
33 | }
|
---|
34 |
|
---|
35 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.