1 package org.simantics.db.testing.cases;
2 /*******************************************************************************
3 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
5 * All rights reserved. This program and the accompanying materials
6 * are made available under the terms of the Eclipse Public License v1.0
7 * which accompanies this distribution, and is available at
8 * http://www.eclipse.org/legal/epl-v10.html
11 * VTT Technical Research Centre of Finland - initial API and implementation
12 *******************************************************************************/
15 import org.junit.After;
16 import org.junit.Before;
17 import org.simantics.SimanticsPlatform;
18 import org.simantics.db.Resource;
19 import org.simantics.db.Session;
20 import org.simantics.db.testing.common.DatabaseState;
21 import org.simantics.db.testing.common.TestBase;
22 import org.simantics.db.testing.common.TestSettings;
23 import org.simantics.db.testing.common.Tests;
25 public class FreshDatabaseTest extends TestBase {
27 public void configure(TestSettings settings) {
32 public void setUp() throws Exception {
34 TestBase.printStart(this);
35 TestSettings testSettings = TestSettings.getInstanceUnsafe();
36 configure(testSettings);
37 // state = AcornTests.newSimanticsWorkspace(testSettings, null);
38 state = Tests.newSimanticsWorkspace(testSettings, null);
45 public void tearDown() throws Exception {
46 Tests.shutdown(state);
50 public Resource getProjectResource() {
51 return SimanticsPlatform.INSTANCE.projectResource;
54 protected Session getSession() {
55 return state.getSession();
58 public DatabaseState getState() {
62 public void reconnect() throws Exception {