KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derbyTesting > functionTests > tests > derbynet > dblook_test_net


1 /*
2
3    Derby - Class org.apache.derbyTesting.functionTests.tests.derbynet.dblook_test_net
4
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to You under the Apache License, Version 2.0
9    (the "License"); you may not use this file except in compliance with
10    the License. You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19
20  */

21
22 package org.apache.derbyTesting.functionTests.tests.derbynet;
23
24 import org.apache.derbyTesting.functionTests.tests.tools.dblook_test;
25
26 public class dblook_test_net extends dblook_test {
27
28     // This test runs dblook on a test database using
29
// a connection to the Network Server.
30

31     public static void main (String JavaDoc [] args) {
32
33         System.out.println("\n-= Start dblook (net server) Test. =-");
34         separator = System.getProperty("file.separator");
35         testDirectory = "dblook_test_net/";
36         new dblook_test_net().doTest();
37         System.out.println("\n[ Done. ]\n");
38
39     }
40
41     /* **********************************************
42      * doTest
43      * Run a test of the dblook utility using
44      * Network Server.
45      ****/

46
47     protected void doTest() {
48
49         try {
50
51             createTestDatabase(dbCreationScript_1);
52
53             // Don't let error stream ruin the diff.
54
System.err.close();
55
56             // The only test we need to run is the one for
57
// Network Server; see functionTests/tools/
58
// dblook_test.java.
59
runTest(3, testDBName, testDBName + "_new");
60
61         } catch (Exception JavaDoc e) {
62             System.out.println("-=- FAILED: to complete the test:");
63             e.printStackTrace();
64         }
65
66     }
67
68 }
69
Popular Tags