@After public void tearDown() throws Exception { ObjectStoreTestUtils.deleteAllObjectsInStore(writer); }
public static void oneTimeSetUp(ObjectStoreWriter writer) throws Exception { ObjectStoreWriterTestCase.writer = writer; ObjectStoreTestUtils.deleteAllObjectsInStore(writer); os = writer.getObjectStore(); data = ObjectStoreTestUtils.getTestData("testmodel", "testmodel_data.xml"); }
public void tearDown() throws Exception { ObjectStoreTestUtils.deleteAllObjectsInStore(storeDataWriter); if (storeDataWriter != null) { storeDataWriter.close(); } super.tearDown(); }
public void tearDown() throws Exception { super.tearDown(); ObjectStoreTestUtils.deleteAllObjectsInStore(storeDataWriter); if (storeDataWriter != null) { storeDataWriter.close(); } }
@AfterClass public static void oneTimeShutdown() throws Exception { ObjectStoreTestUtils.deleteAllObjectsInStore(storeDataWriter); storeDataWriter.close(); }
public void tearDown() throws Exception { super.tearDown(); ObjectStoreTestUtils.deleteAllObjectsInStore(storeDataWriter); if (storeDataWriter != null) { storeDataWriter.close(); } SearchRepository.clearGlobalRepositories(); }
@AfterClass public static void shutdown() throws Exception { try { osw = ObjectStoreWriterFactory.getObjectStoreWriter("osw.unittest"); ObjectStoreTestUtils.deleteAllObjectsInStore(osw); } finally { osw.close(); } }
@AfterClass public static void shutdown() throws Exception { try { osw = ObjectStoreWriterFactory.getObjectStoreWriter("osw.unittest"); ObjectStoreTestUtils.deleteAllObjectsInStore(osw); } finally { osw.close(); } }
@AfterClass public static void shutdown() throws Exception { try { osw = ObjectStoreWriterFactory.getObjectStoreWriter("osw.unittest"); ObjectStoreTestUtils.deleteAllObjectsInStore(osw); } finally { osw.close(); } }
@After public void tearDown() throws Exception { iw.commitTransaction(); iw.getDataTracker().clear(); ObjectStoreTestUtils.deleteAllObjectsInStore(writer); iw.reset(); }
@Before public void setUp() throws Exception { if (iw.isInTransaction()) { iw.abortTransaction(); } iw.getDataTracker().clear(); ObjectStoreTestUtils.deleteAllObjectsInStore(writer); storeData(); iw.reset(); iw.skeletons.clear(); iw.beginTransaction(); //iw.setEof(new HintingFetcher(iw.getObjectStoreWriter().getObjectStore(), iw)); }
@Test public void testSkeletonsException() throws Exception { Address a = (Address) DynamicUtil.createObject(Collections.singleton(Address.class)); a.setAddress("address1"); if (doIds) { a.setId(new Integer(1)); } IntegrationWriterDataTrackingImpl iw2 = (IntegrationWriterDataTrackingImpl) IntegrationWriterFactory.getIntegrationWriter("integration.unittestmulti"); Source source = iw2.getMainSource("testsource", "testsource"); Source skelSource = iw2.getSkeletonSource("testsource", "testsource"); iw2.store(a, source, skelSource, IntegrationWriterDataTrackingImpl.SKELETON); Assert.assertTrue(iw2.skeletons.size() == 1); try { iw2.close(); Assert.fail("Expected exception because not all skeletons replaced by real objects"); } catch (ObjectStoreException e) { } finally { iw2 = (IntegrationWriterDataTrackingImpl) IntegrationWriterFactory.getIntegrationWriter("integration.unittestmulti"); try { ObjectStoreWriter writer2 = iw2.getObjectStoreWriter(); ObjectStoreTestUtils.deleteAllObjectsInStore(writer2); } finally { iw2.close(); } } }
@BeforeClass public static void setUpBeforeClass() throws Exception { osw = ObjectStoreWriterFactory.getObjectStoreWriter("osw.unittest"); ObjectStoreTestUtils.deleteAllObjectsInStore(osw);
@BeforeClass public static void loadData() throws Exception { osw = ObjectStoreWriterFactory.getObjectStoreWriter("osw.unittest"); ObjectStoreTestUtils.deleteAllObjectsInStore(osw);
@BeforeClass public static void loadData() throws Exception { osw = ObjectStoreWriterFactory.getObjectStoreWriter("osw.unittest"); ObjectStoreTestUtils.deleteAllObjectsInStore(osw);