Skip to content

Commit 0fe655e

Browse files
committed
Initial
0 parents  commit 0fe655e

120 files changed

Lines changed: 6565 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.classpath

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
5+
<classpathentry combineaccessrules="false" kind="src" path="/restsql"/>
6+
<classpathentry kind="lib" path="lib/hamcrest-core-1.1.jar"/>
7+
<classpathentry kind="lib" path="lib/hamcrest-library-1.1.jar"/>
8+
<classpathentry kind="lib" path="lib/jersey-client-1.5.jar"/>
9+
<classpathentry kind="lib" path="lib/junit-4.8.2.jar" sourcepath="lib/junit-4.8.2-src.jar"/>
10+
<classpathentry kind="lib" path="lib/jmock-2.5.1.jar">
11+
<attributes>
12+
<attribute name="javadoc_location" value="jar:platform:/resource/restsql-test/lib/jmock-2.5.1-javadoc.zip!/"/>
13+
</attributes>
14+
</classpathentry>
15+
<classpathentry kind="lib" path="/restsql/lib/jersey-core-1.5.jar"/>
16+
<classpathentry kind="lib" path="/restsql/lib/mysql-connector-java-5.1.14-bin.jar"/>
17+
<classpathentry kind="lib" path="/restsql/lib/commons-logging-1.1.1.jar"/>
18+
<classpathentry kind="lib" path="/restsql/lib/servlet-api.jar"/>
19+
<classpathentry kind="output" path="obj/bin"/>
20+
</classpath>

.project

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>restsql-test</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#Sat Feb 19 16:36:17 EST 2011
2+
eclipse.preferences.version=1
3+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
4+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
5+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6+
org.eclipse.jdt.core.compiler.compliance=1.6
7+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
9+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
11+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12+
org.eclipse.jdt.core.compiler.source=1.6

CONTRIBUTORS.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
restSQL Project Contributors
2+
3+
Mark Sawers <mark.sawers@restsql.org>

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License
2+
3+
Copyright (c) 2011 restSQL Project Contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.txt

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
README.txt (14-May-2011)
2+
3+
restSQL Test Deployment Guide
4+
5+
Project website is at http://restsql.org. Distributions at http://restsql.org/dist. Source code hosted at http://github.com/restsql.
6+
7+
-------------------------------------------------------------------------------
8+
Structure and Distributions
9+
10+
restSQL source code is contained in three eclipse projects:
11+
1. restsql (service and core framework)
12+
2. restsql-sdk (documentation, HTTP API explorer, javadoc, examples)
13+
3. restsql-test (test framework, test cases)
14+
15+
restSQL binary distributions contain three libraries:
16+
1. restsql-{version}.jar (core framework only)
17+
2. restsql-{version}.war (service and core framework, 3rd party dependencies)
18+
3. restsql-sdk-{version}.war {sdk)
19+
20+
restSQL source distributions consist of one jar:
21+
1. restsql-{version}-src.jar (service and core framework)
22+
23+
24+
-------------------------------------------------------------------------------
25+
Installing restSQL Test
26+
27+
Requirements: restSQL project or deployed restSQL, JDK, Ant
28+
29+
The test project contains component test code, artifacts and a harness that exercise the framework and the service using the Java and HTTP APIs, respectively. The Java API tests use straight JUnit tests. The HTTP API tests use an XML-driven test case harness built with JUnit. The Java API tests require the restsql project, since it relies on its build file and source code. The HTTP API tests only require a deployed restsql service.
30+
31+
Execution: The tests are executed using the Ant build file (restsql-test/build.xml). Executing the default target, all, will run everything, but you can also run test-api (Java API) or test-service (HTTP API) to run one or either half. If the service is not running in the default location, http://localhost:8080/restsql/, then the System Property, org.restsql.baseUri, must be set. For example:
32+
33+
ant -Dorg.restsql.baseUri=http://somehost:8080/restsql-0.5/ test-service-http
34+
35+
Test results will appear on the screen. Failure detail is available in restsql-test/obj/test.
36+
37+
Database: If you have not deployed the SDK yet, you will need to deploy the extended sakila database. Bash and Windows batch scripts are provided to create the base and extended database for MySQL. The bash script is restsql-test/database/create-sakila.sh and the Windows batch script is restsql-test/database/create-sakila.bat. You will need to change the user and password variables in the beginning of the script to an account that has database and table creation privileges.
38+
39+
40+
-------------------------------------------------------------------------------
41+
License
42+
43+
restSQL is licensed under the standard MIT license. Refer to the LICENSE.txt and CONTRIBUTORS.txt in the distribution.

build.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# restsql-test build.properties
2+
3+
test-compile.classpath=lib/jersey-client-1.5.jar;../restsql/lib/servlet-api.jar;../restsql/lib/commons-logging-1.1.1.jar;../restsql/lib/jsr311-api-1.1.1.jar;lib/junit-4.8.2.jar;lib/jmock-2.5.1.jar;obj/bin;../restsql/obj/bin
4+
test-exec.classpath=${test-compile.classpath};../restsql/lib/mysql-connector-java-5.1.14-bin.jar;../restsql/lib/jaxb-api.jar;../restsql/lib/jaxb-impl.jar;../restsql/lib/jersey-core-1.5.jar;lib/hamcrest-core-1.1.jar;lib/hamcrest-library-1.1.jar;../restsql/lib/log4j-1.2.16.jar
5+
6+
test.list=src/resources/xml/service/testcase/_tests.txt

build.xml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project name="restsql-test" default="all">
3+
<property file="build.properties" />
4+
5+
<taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask" classpath="../restsql/lib/jaxb-xjc.jar" />
6+
7+
<target name="all" depends="clean,test-api,test-service-http,test-report" />
8+
9+
<target name="clean">
10+
<delete dir="obj" failonerror="false" includeEmptyDirs="true" quiet="true" />
11+
</target>
12+
13+
<target name="compile-schema">
14+
<!-- Create output dir -->
15+
<mkdir dir="obj/bin" />
16+
17+
<xjc destdir="src" package="org.restsql.service.testcase" removeOldOutput="yes">
18+
<schema file="src/resources/xml/service/testcase/ServiceTestCaseDefinition.xsd" />
19+
<depends file="src/resources/xml/service/testcase/ServiceTestCaseDefinition.xsd" />
20+
<produces dir="obj/bin" />
21+
</xjc>
22+
</target>
23+
24+
<target name="compile-tests">
25+
<ant antfile="../restsql/build.xml" target="compile" inheritall="no" />
26+
27+
<!-- Create output dir -->
28+
<mkdir dir="obj/bin" />
29+
30+
<!-- Copy supporting files -->
31+
<copy todir="obj/bin">
32+
<fileset dir="src">
33+
<include name="**/*.properties" />
34+
<include name="**/*.xml" />
35+
<include name="**/*.xsd" />
36+
</fileset>
37+
</copy>
38+
39+
<!-- Compile tests -->
40+
<javac srcdir="src" destdir="obj/bin" classpath="${test-compile.classpath}" debug="true" />
41+
</target>
42+
43+
<target name="test-api" depends="compile-tests">
44+
<!-- Create output dir -->
45+
<delete dir="obj/test" />
46+
<mkdir dir="obj/test" />
47+
48+
<!-- Execute tests -->
49+
<junit fork="true" showoutput="true" printsummary="true" tempdir="obj/test" dir="${basedir}">
50+
<sysproperty key="java.util.logging.config.file" value="/restsql/eclipse-workspace/restsql-test/src/resources/properties/test-logging-file.properties" />
51+
<classpath path="${test-exec.classpath}" />
52+
<formatter type="xml" />
53+
<batchtest todir="obj/test">
54+
<fileset dir="src" includes="**/*Test.*" excludes="" />
55+
</batchtest>
56+
</junit>
57+
</target>
58+
59+
<!-- Creates report for API test -->
60+
<target name="test-report">
61+
<!-- Create output dir -->
62+
<delete dir="obj/test/report" />
63+
<mkdir dir="obj/test/report" />
64+
65+
<!-- Create report -->
66+
<junitreport todir="obj/test">
67+
<fileset dir="obj/test">
68+
<include name="TEST-*.xml" />
69+
</fileset>
70+
<report format="frames" todir="obj/test/report" />
71+
</junitreport>
72+
</target>
73+
74+
<target name="test-service-http">
75+
<antcall target="-test-service">
76+
<param name="testStyle" value="http" />
77+
<param name="testList" value="%" />
78+
</antcall>
79+
</target>
80+
81+
<target name="test-service-http-subset">
82+
<antcall target="-test-service">
83+
<param name="testStyle" value="http" />
84+
<param name="testList" value="${test.list}" />
85+
</antcall>
86+
</target>
87+
88+
<target name="test-service-java">
89+
<antcall target="-test-service">
90+
<param name="testStyle" value="java" />
91+
<param name="testList" value="%" />
92+
</antcall>
93+
</target>
94+
95+
<target name="test-service-java-subset">
96+
<antcall target="-test-service">
97+
<param name="testStyle" value="java" />
98+
<param name="testList" value="${test.list}" />
99+
</antcall>
100+
</target>
101+
102+
<target name="-test-service" depends="compile-tests">
103+
<property name="org.restsql.baseUri" value="http://localhost:8080/restsql/" />
104+
<java fork="true" classpath="${test-exec.classpath}" classname="org.restsql.service.ServiceTestRunner" dir="${basedir}">
105+
<arg value="${testStyle}" />
106+
<arg value="${testList}" />
107+
<jvmarg value="-Dorg.restsql.baseUri=${org.restsql.baseUri}" />
108+
</java>
109+
</target>
110+
111+
</project>

lib/hamcrest-core-1.1.jar

32.6 KB
Binary file not shown.

lib/hamcrest-library-1.1.jar

45.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)