KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > jdon > container > ContainerDirectorTest


1 /*
2  * Copyright 2003-2005 the original author or authors.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  *
15  */

16 package com.jdon.container;
17
18 import junit.framework.TestCase;
19
20 import com.jdon.container.builder.ContainerBuilder;
21 import com.jdon.container.builder.ContainerDirector;
22 import com.jdon.container.builder.StartupException;
23 import com.jdon.container.config.app.AppConfigureCollection;
24 import com.jdon.container.factory.ContainerBuilderFactory;
25
26 /**
27  * @author <a HREF="mailto:banqiao@jdon.com">banq</a>
28  *
29  */

30 public class ContainerDirectorTest extends TestCase {
31
32     ContainerDirector containerDirector;
33     /*
34      * @see TestCase#setUp()
35      */

36     protected void setUp() throws Exception JavaDoc {
37         super.setUp();
38         ContainerBuilderFactory containerBuilderFactory = new ContainerBuilderFactory();
39
40         ContainerBuilder containerBuilder = containerBuilderFactory
41                 .createContainerBuilder("container.xml", "aspect.xml");
42         containerDirector = new ContainerDirector(
43                 containerBuilder);
44         
45     }
46
47     /*
48      * @see TestCase#tearDown()
49      */

50     protected void tearDown() throws Exception JavaDoc {
51         super.tearDown();
52         containerDirector = null;
53     }
54
55     public void testStartup() throws StartupException,
56                                      Exception JavaDoc{
57             containerDirector.prepareConfiguration("");
58             containerDirector.startup();
59
60     }
61
62 }
63
Popular Tags