db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r613333 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting: functionTests/suites/All.java junit/EnvTest.java
Date Sat, 19 Jan 2008 01:01:55 GMT
Author: djd
Date: Fri Jan 18 17:01:53 2008
New Revision: 613333

URL: http://svn.apache.org/viewvc?rev=613333&view=rev
Log:
Add a simple "test" that displays (as fixture names) some of the environment checks that the
Junit tests uses, such as JDBC.vmSupportsJDBC3. Add this to suites.All.

Added:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/EnvTest.java   (with props)
Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/All.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/All.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/All.java?rev=613333&r1=613332&r2=613333&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/All.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/All.java
Fri Jan 18 17:01:53 2008
@@ -24,6 +24,7 @@
 import junit.framework.TestSuite;
 
 import org.apache.derbyTesting.junit.BaseTestCase;
+import org.apache.derbyTesting.junit.EnvTest;
 
 public class All extends BaseTestCase {
       
@@ -37,6 +38,10 @@
     public static Test suite() throws Exception {
 
         TestSuite suite = new TestSuite("All");
+        
+        // Simple "test" that displays environment information
+        // as fixture names.
+        suite.addTestSuite(EnvTest.class);
         
         // All package tests
         suite.addTest(AllPackages.suite());

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/EnvTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/EnvTest.java?rev=613333&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/EnvTest.java (added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/EnvTest.java Fri Jan 18
17:01:53 2008
@@ -0,0 +1,67 @@
+/*
+ *
+ * Derby - Class org.apache.derbyTesting.junit.EnvTest
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, 
+ * software distributed under the License is distributed on an 
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
+ * either express or implied. See the License for the specific 
+ * language governing permissions and limitations under the License.
+ */
+package org.apache.derbyTesting.junit;
+
+import junit.framework.TestCase;
+
+/**
+ * Simple Junit "test" that runs a number of fixtures to
+ * show the environment a test would run in.
+ * A fixture changes its name based upon the return
+ * of a method that checks for some environmental condition,
+ * e.g. does this vm support JDBC 3.
+ * Meant as a simple aid to help determine any environment problems.
+ *
+ */
+public class EnvTest extends TestCase {
+	
+	public EnvTest(String name)
+	{
+		super(name);
+	}
+	/*
+	** Tests of the JDBC.vmSupportsXXX to see which JDBC support is available.
+	*/
+	public void testJSR169() {
+		setName(JDBC.vmSupportsJSR169() + "_vmSupportsJSR169()");
+	}
+	public void testJDBC3() {
+		setName(JDBC.vmSupportsJDBC3() + "_vmSupportsJDBC3()");
+	}
+	public void testJDBC4() {
+		setName(JDBC.vmSupportsJDBC4() + "_vmSupportsJDBC4()");
+	}
+	/*
+	** Tests of the Derby.hasXXX to see which Derby code is
+	** available for the tests.
+	*/
+	public void testHasServer() {
+		setName(Derby.hasServer() + "_hasServer");
+	}
+	public void testHasClient() {
+		setName(Derby.hasClient() + "_hasClient");
+	}
+	public void testHasEmbedded() {
+		setName(Derby.hasEmbedded() + "_hasEmbedded");
+	}
+	public void testHasTools() {
+		setName(Derby.hasTools() + "_hasTools");
+	}
+}

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/EnvTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message