Source Code Cross Referenced for NistScripts.java in  » Database-DBMS » db-derby-10.2 » org » apache » derbyTesting » functionTests » tests » nist » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db derby 10.2 » org.apache.derbyTesting.functionTests.tests.nist 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *
003:         * Derby - Class org.apache.derbyTesting.functionTests.tests.nist.NistScripts
004:         *
005:         * Licensed to the Apache Software Foundation (ASF) under one or more
006:         * contributor license agreements.  See the NOTICE file distributed with
007:         * this work for additional information regarding copyright ownership.
008:         * The ASF licenses this file to You under the Apache License, Version 2.0
009:         * (the "License"); you may not use this file except in compliance with
010:         * the License.  You may obtain a copy of the License at
011:         *
012:         *    http://www.apache.org/licenses/LICENSE-2.0
013:         *
014:         * Unless required by applicable law or agreed to in writing, 
015:         * software distributed under the License is distributed on an 
016:         * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
017:         * either express or implied. See the License for the specific 
018:         * language governing permissions and limitations under the License.
019:         */
020:        package org.apache.derbyTesting.functionTests.tests.nist;
021:
022:        import junit.framework.Test;
023:        import junit.framework.TestSuite;
024:
025:        import org.apache.derbyTesting.functionTests.util.ScriptTestCase;
026:        import org.apache.derbyTesting.junit.CleanDatabaseTestSetup;
027:        import org.apache.derbyTesting.junit.TestConfiguration;
028:
029:        /**
030:         * Run the NIST scripts as a single suite.
031:         *
032:         */
033:        public final class NistScripts extends ScriptTestCase {
034:
035:            /**
036:             * The complete set of NIST scripts for Derby.
037:             * First element of array is the script name,
038:             * second element is the user name for the connection.
039:             */
040:            private static final String[][] TESTS = { { "schema1", "HU" },
041:                    { "basetab", "HU" }, { "schema5", "FLATER" },
042:                    { "schema8", "SUN" }, { "temp_schem10", "HU" },
043:                    { "temp_cts5sch2", "HU" }, { "temp_cts5tab", "CTS1" },
044:                    { "flattab", "FLATER" }, { "dml012", "HU" },
045:                    { "dml013", "HU" }, { "dml018", "HU" }, { "dml022", "HU" },
046:                    { "dml025", "HU" }, { "dml044", "HU" }, { "dml045", "HU" },
047:                    { "dml051", "HU" }, { "dml059", "HU" }, { "dml061", "HU" },
048:                    { "dml073", "HU" }, { "dml087", "FLATER" },
049:                    { "dml090", "HU" }, { "dml106", "FLATER" },
050:                    { "dml108", "FLATER" }, { "dml114", "FLATER" },
051:                    { "dml141", "FLATER" }, { "dml144", "FLATER" },
052:                    { "dml162", "FLATER" }, { "dml177", "FLATER" },
053:                    { "dml010", "HU" }, { "dml015", "HU" }, { "dml020", "HU" },
054:                    { "dml037", "HU" }, { "dml038", "HU" }, { "dml042", "HU" },
055:                    { "dml043", "HU" }, { "dml047", "HU" }, { "dml056", "HU" },
056:                    { "dml065", "HU" }, { "dml076", "HU" }, { "sdl012", "HU" },
057:                    { "dml029", "HU" }, { "yts796", "CTS1" },
058:                    { "dml075", "HU" }, { "dml024", "HU" }, { "dml070", "HU" },
059:                    { "dml147", "FLATER" }, { "dml009", "HU" },
060:                    { "dml008", "HU" }, { "dml014", "HU" },
061:                    { "dml016", "SULLIVAN1" }, { "dml021", "HU" },
062:                    { "dml034", "HU" }, { "dml023", "HU" }, { "dml026", "HU" },
063:                    { "dml033", "HU" }, { "dml039", "HU" }, { "dml050", "HU" },
064:                    { "dml052", "HU" }, { "dml053", "HU" }, { "dml055", "HU" },
065:                    { "dml057", "HU" }, { "dml058", "HU" },
066:                    { "dml155", "FLATER" }, { "xts729", "CTS1" },
067:                    { "xts730", "CTS1" }, { "yts797", "CTS1" },
068:                    { "yts798", "CTS1" }, { "dml069", "HU" },
069:                    { "dml080", "SCHANZLE" }, { "dml081", "SCHANZLE" },
070:                    { "dml083", "SCHANZLE" }, { "dml085", "SCHANZLE" },
071:                    { "dml132", "FLATER" }, { "dml099", "FLATER" },
072:                    { "dml049", "HU" }, { "dml173", "FLATER" },
073:                    { "dml174", "FLATER" }, { "dml179", "FLATER" },
074:                    { "yts812", "CTS1" }, { "dml001", "HU" },
075:                    { "dml004", "HU" }, { "dml035", "HU" }, { "dml046", "HU" },
076:                    { "dml060", "HU" }, { "dml068", "HU" },
077:                    { "yts799", "CTS1" }, { "dml001", "HU" },
078:                    { "dml079", "HU" }, { "dml165", "FLATER" },
079:                    { "dml104", "FLATER" }, { "dml112", "FLATER" },
080:                    { "dml148", "FLATER" }, { "dml019", "HU" },
081:                    { "dml149", "FLATER" }, { "dml168", "FLATER" },
082:                    { "dml170", "FLATER" }, { "xts752", "CTS1" },
083:                    { "xts753", "CTS1" }, { "cdr002", "SUN" },
084:                    { "cdr003", "SUN" }, { "cdr004", "SUN" },
085:                    { "cdr005", "SUN" }, { "cdr006", "SUN" },
086:                    { "cdr007", "SUN" }, { "cdr027", "SUN" },
087:                    { "cdr030", "SUN" }, { "dml134", "FLATER" },
088:                    { "dml005", "HU" }, { "dml011", "HU" }, { "dml027", "HU" },
089:                    { "dml082", "SCHANZLE" }, { "dml091", "SCHANZLE" },
090:                    { "dml119", "FLATER" }, { "dml130", "FLATER" },
091:                    { "dml158", "HU" }, { "dml178", "FLATER" },
092:                    { "dml181", "FLATER" }, { "dml182", "FLATER" },
093:                    { "xts701", "CTS1" }, { "xts731", "CTS1" },
094:                    { "xts740", "CTS1" }, { "xts742", "CTS1" },
095:                    { "xts760", "CTS1" }, { "yts811", "CTS1" },
096:                    { "dml160", "FLATER" }, { "schema4", "SULLIVAN1" } };
097:
098:            /**
099:             * Return the suite that runs the NIST SQL scripts.
100:             */
101:            public static Test suite() {
102:                TestSuite suite = new TestSuite();
103:
104:                String suiteUser = null;
105:                TestSuite userSuite = null;
106:                for (int i = 0; i < TESTS.length; i++) {
107:
108:                    String testScript = TESTS[i][0];
109:                    String testUser = TESTS[i][1];
110:
111:                    Test test = new NistScripts(testScript);
112:
113:                    if (testUser.equals(suiteUser)) {
114:                        userSuite.addTest(test);
115:                        continue;
116:                    }
117:
118:                    // Add the new user suite with the change user decorator to
119:                    // the main suite but continue to add tests to the user suite.
120:                    userSuite = new TestSuite();
121:                    String password = testUser.concat("PWD");
122:                    suite.addTest(TestConfiguration.changeUserDecorator(
123:                            userSuite, testUser, password));
124:                    suiteUser = testUser;
125:
126:                    userSuite.addTest(test);
127:                }
128:
129:                return new CleanDatabaseTestSetup(getIJConfig(suite));
130:            }
131:
132:            /*
133:             * A single JUnit test that runs a single language SQL script.
134:             */
135:            private NistScripts(String nistScript) {
136:                super(nistScript);
137:            }
138:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.