1 4 package com.tctest.spring.integrationtests.framework; 5 6 import java.io.IOException ; 7 8 import junit.extensions.TestSetup; 9 import junit.framework.TestSuite; 10 11 public class ServerTestSetup extends TestSetup { 12 13 private final Class testClass; 14 protected ServerManager sm; 15 16 public ServerTestSetup(Class testClass) { 17 super(new TestSuite(testClass)); 18 this.testClass = testClass; 19 } 20 21 protected void setUp() throws Exception { 22 sm = ServerManagerUtil.startAndBind(testClass, isWithPersistentStore()); 23 } 24 25 protected void tearDown() throws Exception { 26 ServerManagerUtil.stopAndRelease(sm); 27 } 28 29 public DeploymentBuilder makeDeploymentBuilder() throws IOException { 30 return sm.makeDeploymentBuilder(); 31 } 32 33 public DeploymentBuilder makeDeploymentBuilder(String warFileName) { 34 return sm.makeDeploymentBuilder(warFileName); 35 } 36 37 public boolean isWithPersistentStore() { 38 return false; 39 } 40 41 } 42 | Popular Tags |