01: /*
02: * Copyright 2007 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.springunit.framework.junit4;
18:
19: import org.junit.After;
20: import org.junit.Before;
21: import org.junit.runner.RunWith;
22: import org.springunit.framework.SpringUnitTransactionalTest;
23:
24: /**
25: * SpringUnitTransactionalTest enabled for use with JUnit4 annotations.<br/>
26: * <br/>
27: * The approach followed here follows the example given by Derek Young,
28: * "Adapting Spring's JUnit 3.x base classes to JUnit 4",
29: * Tuesday, April 3, 2007,
30: * http://dmy999.com/article/21/adapting-a-springs-junit-3x-base-classes-to-junit-4.
31: * <br/>
32: *
33: * @author <a href="mailto:ted@velkoff.com">Ted Velkoff</a>
34: *
35: */
36: @RunWith(NameRunner.class)
37: public abstract class SpringUnit4TransactionalTest extends
38: SpringUnitTransactionalTest {
39:
40: @Before
41: final public void callSetUp() throws Exception {
42: this .setName(NameRunner.getTestMethodName());
43: super .setUp();
44: }
45:
46: @After
47: final public void callTearDown() throws Exception {
48: super.tearDown();
49: }
50:
51: }
|