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.bmp;
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 BmpLocalTestSuite extends
28: org.apache.openejb.test.FilteredTestSuite {
29:
30: public BmpLocalTestSuite() {
31: super ();
32: this .addTest(new BmpJndiTests());
33: this .addTest(new BmpHomeIntfcTests());
34: this .addTest(new BmpEjbHomeTests());
35: this .addTest(new BmpEjbObjectTests());
36: this .addTest(new BmpRemoteIntfcTests());
37: this .addTest(new BmpHomeHandleTests());
38: this .addTest(new BmpHandleTests());
39: this .addTest(new BmpEjbMetaDataTests());
40: this .addTest(new BmpAllowedOperationsTests());
41: this .addTest(new BmpJndiEncTests());
42: // this.addTest(new BmpContextLookupTests());
43: this .addTest(new BmpRmiIiopTests());
44:
45: }
46:
47: public static junit.framework.Test suite() {
48: return new BmpLocalTestSuite();
49: }
50:
51: /**
52: * Sets up the fixture, for example, open a network connection.
53: * This method is called before a test is executed.
54: */
55: protected void setUp() throws Exception {
56: Properties props = TestManager.getServer()
57: .getContextEnvironment();
58: //props.put(Context.SECURITY_PRINCIPAL, "ENTITY_TEST_CLIENT");
59: //props.put(Context.SECURITY_CREDENTIALS, "ENTITY_TEST_CLIENT");
60: InitialContext initialContext = new InitialContext(props);
61:
62: /*[2] Create database table */
63: TestManager.getDatabase().createEntityTable();
64: }
65:
66: /**
67: * Tears down the fixture, for example, close a network connection.
68: * This method is called after a test is executed.
69: */
70: protected void tearDown() throws Exception {
71: /*[1] Drop database table */
72: TestManager.getDatabase().dropEntityTable();
73: }
74: }
|