@Before public void setUp() throws Exception { super.setUp(); }
public void assertAutoCreateSchema() throws Exception { assertSchemaExists("Employee"); }
@BeforeClass public static void setUpClass() throws Exception { List<String> cacheNames = new ArrayList<>(); cacheNames.add(Employee.class.getSimpleName()); cacheNames.add(WebPage.class.getSimpleName()); setTestDriver(new GoraInfinispanTestDriver(1, cacheNames)); DataStoreTestBase.setUpClass(); }
@Test public void testPut() throws Exception { log.info("test method: testPut"); Employee employee = DataStoreTestUtil.testPutEmployee(employeeStore); assertPut(employee); }
@Test public void testPutBytes() throws Exception { log.info("test method: testPutBytes"); byte[] contentBytes = DataStoreTestUtil.testPutBytes(webPageStore); assertPutBytes(contentBytes); }
@Test public void testPutMap() throws Exception { log.info("test method: testPutMap"); DataStoreTestUtil.testPutMap(webPageStore); assertPutMap(); }
@Test public void testAutoCreateSchema() throws Exception { log.info("test method: testAutoCreateSchema"); DataStoreTestUtil.testAutoCreateSchema(employeeStore); assertAutoCreateSchema(); }
@Test public void testPutArray() throws Exception { log.info("test method: testPutArray"); DataStoreTestUtil.testPutArray(webPageStore); assertPutArray(); }
@Before public void setUp() throws Exception { //There is an issue in JUnit 4 tests in Eclipse where TestSqlStore static //methods are not called BEFORE setUpClass. I think this is a bug in //JUnitRunner in Eclipse. Below is a workaround for that problem. if(!setUpClassCalled) { setUpClass(); } log.info("setting up test"); if(testDriver != null) { employeeStore = testDriver.createDataStore(String.class, Employee.class); webPageStore = testDriver.createDataStore(String.class, WebPage.class); testDriver.setUp(); } }
@Before public void setUp() throws Exception { GoraInfinispanTestDriver driver = getTestDriver(); conf = driver.getConfiguration(); conf.set(ISPN_CONNECTION_STRING_KEY,getTestDriver().connectionString()); super.setUp(); employeeDataStore = (InfinispanStore<String, Employee>) employeeStore; webPageDataStore = (InfinispanStore<String, WebPage>) webPageStore; }
@Test public void testTruncateSchema() throws Exception { log.info("test method: testTruncateSchema"); DataStoreTestUtil.testTruncateSchema(webPageStore); assertSchemaExists("WebPage"); }
@Test public void testCreateSchema() throws Exception { log.info("test method: testCreateSchema"); DataStoreTestUtil.testCreateEmployeeSchema(employeeStore); assertSchemaExists("Employee"); }