01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */package org.apache.openejb.test.entity.cmp;
17:
18: import org.apache.openejb.test.TestManager;
19:
20: import javax.naming.InitialContext;
21: import java.util.Properties;
22:
23: /**
24: * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
25: * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
26: */
27: public class CmpTestSuite extends
28: org.apache.openejb.test.FilteredTestSuite {
29:
30: public CmpTestSuite() {
31: super ();
32: this .addTest(new CmpJndiTests());
33: this .addTest(new CmpHomeIntfcTests());
34: this .addTest(new CmpEjbHomeTests());
35: this .addTest(new CmpEjbObjectTests());
36: this .addTest(new CmpRemoteIntfcTests());
37: this .addTest(new CmpHomeHandleTests());
38: this .addTest(new CmpHandleTests());
39: this .addTest(new CmpEjbMetaDataTests());
40: this .addTest(new CmpAllowedOperationsTests());
41: this .addTest(new CmpJndiEncTests());
42: this .addTest(new CmpContextLookupTests());
43: this .addTest(new CmpRmiIiopTests());
44:
45: this .addTest(new ComplexHomeIntfcTests());
46: this .addTest(new ComplexEjbHomeTests());
47: this .addTest(new ComplexEjbObjectTests());
48: this .addTest(new ComplexRemoteIntfcTests());
49: this .addTest(new ComplexHomeHandleTests());
50: this .addTest(new ComplexHandleTests());
51: this .addTest(new ComplexEjbMetaDataTests());
52:
53: this .addTest(new UnknownHomeIntfcTests());
54: this .addTest(new UnknownEjbHomeTests());
55: this .addTest(new UnknownEjbObjectTests());
56: this .addTest(new UnknownRemoteIntfcTests());
57: this .addTest(new UnknownHomeHandleTests());
58: this .addTest(new UnknownHandleTests());
59: this .addTest(new UnknownEjbMetaDataTests());
60: }
61:
62: public static junit.framework.Test suite() {
63: return new CmpTestSuite();
64: }
65:
66: /**
67: * Sets up the fixture, for example, open a network connection.
68: * This method is called before a test is executed.
69: */
70: protected void setUp() throws Exception {
71: Properties props = TestManager.getServer()
72: .getContextEnvironment();
73: //props.put(Context.SECURITY_PRINCIPAL, "ENTITY_TEST_CLIENT");
74: //props.put(Context.SECURITY_CREDENTIALS, "ENTITY_TEST_CLIENT");
75: InitialContext initialContext = new InitialContext(props);
76:
77: /*[2] Create database table */
78: TestManager.getDatabase().createEntityTable();
79: }
80:
81: /**
82: * Tears down the fixture, for example, close a network connection.
83: * This method is called after a test is executed.
84: */
85: protected void tearDown() throws Exception {
86: /*[1] Drop database table */
87: TestManager.getDatabase().dropEntityTable();
88: }
89: }
|