1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.db.testing.cases;
14 import org.junit.After;
15 import org.junit.Before;
16 import org.simantics.SimanticsPlatform;
17 import org.simantics.db.Resource;
18 import org.simantics.db.Session;
19 import org.simantics.db.testing.common.DatabaseState;
20 import org.simantics.db.testing.common.TestBase;
21 import org.simantics.db.testing.common.TestSettings;
22 import org.simantics.db.testing.common.Tests;
24 public class FreshDatabaseTest extends TestBase {
26 public void configure(TestSettings settings) {
30 public void setUp() throws Exception {
31 TestBase.printStart(this);
32 TestSettings testSettings = TestSettings.getInstanceUnsafe();
33 configure(testSettings);
34 state = Tests.newSimanticsWorkspace(testSettings, null);
39 public void tearDown() throws Exception {
40 Tests.shutdown(state);
44 public Resource getProjectResource() {
45 return SimanticsPlatform.INSTANCE.projectResource;
48 protected Session getSession() {
49 return state.getSession();
52 public DatabaseState getState() {
56 public void reconnect() throws Exception {