01: /*
02: * Copyright 2006 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.tests;
18:
19: import javax.sql.DataSource;
20:
21: import org.springunit.framework.SpringUnitTransactionalTest;
22: import org.springunit.framework.SpringUnitContext;
23:
24: public class OneDeepTransactionalTest extends
25: SpringUnitTransactionalTest {
26:
27: public OneDeepTransactionalTest() {
28: }
29:
30: public OneDeepTransactionalTest(String fName) {
31: super (fName);
32: this .setDependencyCheck(false); // don't attempt to create real data source
33: }
34:
35: public void testOne() throws Exception {
36: assertEquals(1, getObject("a"));
37: assertEquals(4, getObject("d"));
38: assertNull(getObject("g"));
39: }
40:
41: public void testFour() throws Exception {
42: assertNull(getObject("z"));
43: }
44:
45: public SpringUnitContext getOneDeepTransactionalTest() {
46: return this .oneDeepTransactionalTest;
47: }
48:
49: public void setOneDeepTransactionalTest(
50: SpringUnitContext oneDeepTransactionalTest) {
51: this .oneDeepTransactionalTest = oneDeepTransactionalTest;
52: }
53:
54: public DataSource getDataSource() {
55: return this .dataSource;
56: }
57:
58: public void setDataSource(DataSource dataSource) {
59: this .dataSource = dataSource;
60: }
61:
62: private SpringUnitContext oneDeepTransactionalTest;
63:
64: private DataSource dataSource;
65:
66: }
|