source: src/test/java/exampleagentstest/StorageExampleTest.java

Last change on this file was 176, checked in by Wouter Pasman, 6 years ago

#67 add StorageExample test

File size: 885 bytes
Line 
1package exampleagentstest;
2
3import static org.mockito.Mockito.mock;
4import static org.mockito.Mockito.when;
5
6import java.io.IOException;
7
8import org.junit.Before;
9
10import genius.core.exceptions.InstantiateException;
11import genius.core.persistent.PersistentDataType;
12import genius.core.persistent.StandardInfoList;
13import storageexample.GroupX;
14
15public 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.