You are viewing a plain text version of this content. The canonical link for it is here.
Posted to kato-commits@incubator.apache.org by sp...@apache.org on 2009/11/23 11:52:37 UTC
svn commit: r883312 - in
/incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit:
AbstractImageTestcase.java ImageLoaderHelper.java TestManifestProperties.java
Author: spoole
Date: Mon Nov 23 11:52:36 2009
New Revision: 883312
URL: http://svn.apache.org/viewvc?rev=883312&view=rev
Log:
refactored tck testcases to not use old style configuration. Also renamed few outstanding classes with "DTFJ" in name
Added:
incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/AbstractImageTestcase.java
- copied, changed from r883107, incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/AbstractDTFJTestcase.java
incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/ImageLoaderHelper.java
- copied, changed from r883107, incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/DTFJImageLoader.java
incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/TestManifestProperties.java
- copied, changed from r883107, incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/DTFJManifestTests.java
Copied: incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/AbstractImageTestcase.java (from r883107, incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/AbstractDTFJTestcase.java)
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/AbstractImageTestcase.java?p2=incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/AbstractImageTestcase.java&p1=incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/AbstractDTFJTestcase.java&r1=883107&r2=883312&rev=883312&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/AbstractDTFJTestcase.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/AbstractImageTestcase.java Mon Nov 23 11:52:36 2009
@@ -34,10 +34,10 @@
import javax.tools.diagnostics.runtime.java.JavaThread;
import org.apache.kato.tck.harness.TCKProcessTestcase;
-import org.apache.kato.tests.junit.DTFJImageLoader.Capabilities;
+import org.apache.kato.tests.junit.ImageLoaderHelper.Capabilities;
-public abstract class AbstractDTFJTestcase extends TCKProcessTestcase {
+public abstract class AbstractImageTestcase extends TCKProcessTestcase {
private static Capabilities capabilities = null;
@@ -62,7 +62,7 @@
try {
if (null == capabilities) {
- capabilities=new DTFJImageLoader().getCapabilities();
+ capabilities=new ImageLoaderHelper().getCapabilities();
}
} catch (Throwable t) {
t.printStackTrace();
@@ -264,7 +264,7 @@
protected void setUp() throws Exception {
- if(capabilities==null) capabilities=new DTFJImageLoader().getCapabilities();
+ if(capabilities==null) capabilities=new ImageLoaderHelper().getCapabilities();
}
}
Copied: incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/ImageLoaderHelper.java (from r883107, incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/DTFJImageLoader.java)
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/ImageLoaderHelper.java?p2=incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/ImageLoaderHelper.java&p1=incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/DTFJImageLoader.java&r1=883107&r2=883312&rev=883312&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/DTFJImageLoader.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/ImageLoaderHelper.java Mon Nov 23 11:52:36 2009
@@ -16,37 +16,24 @@
import javax.tools.diagnostics.image.Image;
import javax.tools.diagnostics.image.ImageFactory;
+
import org.apache.kato.tck.api.IImageCreator;
-import org.apache.kato.tck.api.TCKConfiguration;
-public class DTFJImageLoader {
+public class ImageLoaderHelper {
public Capabilities getCapabilities() throws Exception {
-
- TCKConfiguration config=TCKConfiguration.getConfiguration();
-
-
-
-
- IImageCreator creator=config.getImageCreator();
+
+ IImageCreator creator=null;
Capabilities c=new Capabilities();
- c.image=creator.createProcessImage(config);
+ c.image=creator.createProcessImage();
- String vendor=config.getVendor();
-
- //TODO: instantiate vm-specific factory class
- //see example below
-
-// Class factoryClass = Class.forName("<factory class name>");
-// c.factory = (ImageFactory) factoryClass.newInstance();
-// c.hasRootSupport=false;
- return c;
+ return c;
}
Copied: incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/TestManifestProperties.java (from r883107, incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/DTFJManifestTests.java)
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/TestManifestProperties.java?p2=incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/TestManifestProperties.java&p1=incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/DTFJManifestTests.java&r1=883107&r2=883312&rev=883312&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/DTFJManifestTests.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/TestManifestProperties.java Mon Nov 23 11:52:36 2009
@@ -25,7 +25,7 @@
import junit.framework.TestCase;
-public class DTFJManifestTests extends TestCase {
+public class TestManifestProperties extends TestCase {
private static final String ORG_APACHE_KATO_IMAGE = "org/apache/kato/image/";
@@ -45,7 +45,7 @@
}
/**
- * Locates the manifest for DTFJ. This manifest may either
+ * Locates the manifest for . This manifest may either
* be local to the source code (in on the filesystem) on within
* the jar
*
@@ -111,15 +111,15 @@
}
- public void testHasDTFJAPINameSection() throws IOException {
+ public void testHasAPINameSection() throws IOException {
Manifest m = getManifest();
Attributes attrs =m.getAttributes(ORG_APACHE_KATO_IMAGE);
- assertNotNull("missing DTFJ API Name section ["+ORG_APACHE_KATO_IMAGE+"] in manifest",attrs);
+ assertNotNull("missing API Name section ["+ORG_APACHE_KATO_IMAGE+"] in manifest",attrs);
}
-public void testHasDTFJImplementationTitle() throws IOException {
+public void testHasImplementationTitle() throws IOException {
Manifest m = getManifest();
Attributes attrs =m.getAttributes(ORG_APACHE_KATO_IMAGE);
@@ -129,7 +129,7 @@
}
-public void testHasDTFJImplementationVendor() throws IOException {
+public void testHasImplementationVendor() throws IOException {
Manifest m = getManifest();
Attributes attrs =m.getAttributes(ORG_APACHE_KATO_IMAGE);
@@ -138,7 +138,7 @@
}
-public void testHasDTFJImplementationVersion() throws IOException {
+public void testHasImplementationVersion() throws IOException {
Manifest m = getManifest();
Attributes attrs =m.getAttributes(ORG_APACHE_KATO_IMAGE);
@@ -147,7 +147,7 @@
}
-public void testHasDTFJSpecificationTitle() throws IOException {
+public void testHasSpecificationTitle() throws IOException {
Manifest m = getManifest();
Attributes attrs =m.getAttributes(ORG_APACHE_KATO_IMAGE);
@@ -155,7 +155,7 @@
assertNotNull("Specification-Title is missing in ["+ORG_APACHE_KATO_IMAGE+"] section of manifest",value);
}
-public void testHasDTFJSpecificationVendor() throws IOException {
+public void testHasSpecificationVendor() throws IOException {
Manifest m = getManifest();
Attributes attrs =m.getAttributes(ORG_APACHE_KATO_IMAGE);
@@ -163,7 +163,7 @@
assertNotNull("Specification-Vendor is missing in ["+ORG_APACHE_KATO_IMAGE+"] section of manifest",value);
}
-public void testHasDTFJSpecificationVersion() throws IOException {
+public void testHasSpecificationVersion() throws IOException {
Manifest m = getManifest();
Attributes attrs =m.getAttributes(ORG_APACHE_KATO_IMAGE);
@@ -171,7 +171,7 @@
assertNotNull("Specification-Version is missing in ["+ORG_APACHE_KATO_IMAGE+"] section of manifest",value);
}
-public void testHasValidDTFJSpecificationVendor() throws IOException {
+public void testHasValidSpecificationVendor() throws IOException {
Manifest m = getManifest();
Attributes attrs =m.getAttributes(ORG_APACHE_KATO_IMAGE);
@@ -179,7 +179,7 @@
assertEquals("Specification-Vendor is incorrect in ["+ORG_APACHE_KATO_IMAGE+"] section of manifest","Apache",value.toString());
}
-public void testHasValidDTFJSpecificationVersion() throws IOException {
+public void testHasValidSpecificationVersion() throws IOException {
Manifest m = getManifest();
Attributes attrs =m.getAttributes(ORG_APACHE_KATO_IMAGE);
@@ -187,7 +187,7 @@
assertEquals("Specification-Version is incorrect in ["+ORG_APACHE_KATO_IMAGE+"] section of manifest","1.3",value.toString());
}
-public void testHasValidDTFJSpecificationTitle() throws IOException {
+public void testHasValidSpecificationTitle() throws IOException {
Manifest m = getManifest();
Attributes attrs =m.getAttributes(ORG_APACHE_KATO_IMAGE);
@@ -195,7 +195,7 @@
assertEquals("Specification-Title is incorrect in ["+ORG_APACHE_KATO_IMAGE+"] section of manifest","Diagnostic Tool Framework for Java",value.toString());
}
-public void testHasValidDTFJImplementationVendor() throws IOException {
+public void testHasValidImplementationVendor() throws IOException {
Manifest m = getManifest();
Attributes attrs =m.getAttributes(ORG_APACHE_KATO_IMAGE);
@@ -204,7 +204,7 @@
}
-public void testHasValidDTFJImplementationVersion() throws IOException {
+public void testHasValidImplementationVersion() throws IOException {
Manifest m = getManifest();
Attributes attrs =m.getAttributes(ORG_APACHE_KATO_IMAGE);