1   package org.apache.torque;
2   
3   /*
4    * Copyright 2001-2005 The Apache Software Foundation.
5    *
6    * Licensed under the Apache License, Version 2.0 (the "License")
7    * you may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    *
10   *     http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing, software
13   * distributed under the License is distributed on an "AS IS" BASIS,
14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   * See the License for the specific language governing permissions and
16   * limitations under the License.
17   */
18  
19  
20  /***
21   * Tests the TorqueInstance Class.
22   *
23   * @author <a href="mailto:fischer@seitenbau.de">Thomas Fischer</a>
24   * @version $Id: TorqueInstanceTest.java 326694 2005-10-19 20:36:03Z tfischer $
25   */
26  public class TorqueInstanceTest extends BaseTestCase
27  {  
28      /*** The name of the "default" dataSourceFactory" as used by Turbine */
29      private static final String DEFAULT_NAME = "default";
30      
31      /***
32       * Creates a new instance.
33       *
34       * @param name the name of the test case to run
35       */
36      public TorqueInstanceTest(String name)
37      {
38          super(name);
39      }
40      
41      /***
42       * Checks whether a DataSourceFactory with the name 
43       * <code>DEFAULT_NAME</code> is defined (TRQS 322)
44       * @throws Exception if an error occurs during the Test
45       */
46      public void testDefaultDataSourceFactory() throws Exception
47      {
48          assertNotNull(Torque.getInstance().getDataSourceFactory(DEFAULT_NAME));
49      }
50  }