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.cmp2;
17:
18: import org.apache.openejb.test.TestManager;
19: import org.apache.openejb.test.entity.cmr.CmrTestSuite;
20:
21: import javax.naming.InitialContext;
22: import java.util.Properties;
23:
24: /**
25: * @version $Revision: 633268 $ $Date: 2008-03-03 12:39:06 -0800 $
26: */
27: public class Cmp2TestSuite extends
28: org.apache.openejb.test.FilteredTestSuite {
29:
30: public Cmp2TestSuite() {
31: super ();
32: this .addTest(new Cmp2JndiTests());
33: this .addTest(new Cmp2HomeIntfcTests());
34: this .addTest(new Cmp2EjbHomeTests());
35: this .addTest(new Cmp2EjbObjectTests());
36: this .addTest(new Cmp2RemoteIntfcTests());
37: this .addTest(new Cmp2HomeHandleTests());
38: this .addTest(new Cmp2HandleTests());
39: this .addTest(new Cmp2EjbMetaDataTests());
40: this .addTest(new Cmp2AllowedOperationsTests());
41: this .addTest(new Cmp2JndiEncTests());
42: this .addTest(new Cmp2RmiIiopTests());
43:
44: this .addTest(new Complex2HomeIntfcTests());
45: this .addTest(new Complex2EjbHomeTests());
46: this .addTest(new Complex2EjbObjectTests());
47: this .addTest(new Complex2RemoteIntfcTests());
48: this .addTest(new Complex2HomeHandleTests());
49: this .addTest(new Complex2HandleTests());
50: this .addTest(new Complex2EjbMetaDataTests());
51:
52: this .addTest(new Unknown2HomeIntfcTests());
53: this .addTest(new Unknown2EjbHomeTests());
54: this .addTest(new Unknown2EjbObjectTests());
55: this .addTest(new Unknown2RemoteIntfcTests());
56: this .addTest(new Unknown2HomeHandleTests());
57: this .addTest(new Unknown2HandleTests());
58: this .addTest(new Unknown2EjbMetaDataTests());
59: }
60:
61: public static junit.framework.Test suite() {
62: return new Cmp2TestSuite();
63: }
64:
65: /**
66: * Sets up the fixture, for example, open a network connection.
67: * This method is called before a test is executed.
68: */
69: protected void setUp() throws Exception {
70: Properties props = TestManager.getServer()
71: .getContextEnvironment();
72: //props.put(Context.SECURITY_PRINCIPAL, "ENTITY_TEST_CLIENT");
73: //props.put(Context.SECURITY_CREDENTIALS, "ENTITY_TEST_CLIENT");
74: new InitialContext(props);
75:
76: /*[2] Create database table */
77: TestManager.getDatabase().createEntityTable();
78: // TestManager.getDatabase().createEntityExplicitePKTable();
79: // TestManager.getDatabase().createCMP2Model();
80: }
81:
82: /**
83: * Tears down the fixture, for example, close a network connection.
84: * This method is called after a test is executed.
85: */
86: protected void tearDown() throws Exception {
87: /*[1] Drop database table */
88: TestManager.getDatabase().dropEntityTable();
89: // TestManager.getDatabase().dropEntityExplicitePKTable();
90: // TestManager.getDatabase().dropCMP2Model();
91: }
92: }
|