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 {
33 TestBase.printStart(this);
34 TestSettings testSettings = TestSettings.getInstanceUnsafe();
35 configure(testSettings);
36 state = Tests.newSimanticsWorkspace(testSettings, null);
41 public void tearDown() throws Exception {
42 Tests.shutdown(state);
46 public Resource getProjectResource() {
47 return SimanticsPlatform.INSTANCE.projectResource;
50 protected Session getSession() {
51 return state.getSession();
54 public DatabaseState getState() {
58 public void reconnect() throws Exception {