diff --git a/.gitignore b/.gitignore index 346e1d7..6ed0556 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ target/ /bin/ - +.settings/ .classpath .project JTreport/ diff --git a/build.xml b/build.xml deleted file mode 100644 index 023f84c..0000000 --- a/build.xml +++ /dev/null @@ -1,187 +0,0 @@ - - - - - Builds and runs the project activation-tck. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docker-images/Dockerfile1 b/docker-images/Dockerfile1 deleted file mode 100644 index bd4518c..0000000 --- a/docker-images/Dockerfile1 +++ /dev/null @@ -1,35 +0,0 @@ -FROM centos:7 - -ARG HTTPS_PROXY= -ARG MAVEN_VERSION=3.5.4 -ARG MAVEN_BASE_URL=https://apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries -ARG ANT_VERSION=1.10.5 -ARG ANT_BASE_URL=https://apache.org/dist/ant/binaries/ - -ADD jdk-11.0.3_linux-x64_bin.tar.gz /opt -ADD jdk-8u191-linux-x64.tar.gz /opt - -RUN echo "proxy=${HTTPS_PROXY}" >> /etc/yum.conf && \ - yum install -y ld-linux.so.2 glibc.i686 git wget which tar zip unzip && \ - mkdir -p /usr/share/maven /usr/share/maven/ref && \ - wget -e use_proxy=yes -e https_proxy=${HTTPS_PROXY} --no-cache --no-check-certificate ${MAVEN_BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz -O /tmp/apache-maven.tar.gz && \ - tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1 && \ - rm -f /tmp/apache-maven.tar.gz && \ - ln -s /usr/share/maven/bin/mvn /usr/bin/mvn && \ - mkdir -p /usr/share/ant && \ - wget -e use_proxy=yes -e https_proxy=${HTTPS_PROXY} --no-cache --no-check-certificate ${ANT_BASE_URL}/apache-ant-${ANT_VERSION}-bin.tar.gz -O /tmp/apache-ant.tar.gz && \ - tar -xzf /tmp/apache-ant.tar.gz -C /usr/share/ant --strip-components=1 && \ - ln -s /usr/share/ant/bin/ant /usr/bin/ant && \ - rm -f /tmp/apache-ant.tar.gz && \ - rm -f /opt/*.tar* && \ - mkdir -p /.m2 && \ - chgrp -R 0 /opt /root /usr/share /.m2 && \ - chmod -R g=u /opt /root /usr/share /.m2 && \ - chmod -R 775 /root /.m2 - -ENV JAVA_HOME=/opt/jdk1.8.0_191 -ENV JDK11_HOME=/opt/jdk-11.0.3 -ENV ANT_HOME=/usr/share/ant -ENV PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH - -CMD which mvn && mvn -version diff --git a/docker-images/Dockerfile2 b/docker-images/Dockerfile2 deleted file mode 100644 index 8e98aae..0000000 --- a/docker-images/Dockerfile2 +++ /dev/null @@ -1,35 +0,0 @@ -FROM centos:7 - -ARG HTTPS_PROXY= -ARG MAVEN_VERSION=3.6.3 -ARG MAVEN_BASE_URL=https://apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries -ARG ANT_VERSION=1.10.9 -ARG ANT_BASE_URL=https://apache.org/dist/ant/binaries/ - -ADD jdk-11.0.10_linux-x64_bin.tar.gz /opt -ADD jdk-8u251-linux-x64.tar.gz /opt - -RUN echo "proxy=${HTTPS_PROXY}" >> /etc/yum.conf && \ - yum install -y ld-linux.so.2 glibc.i686 git wget which tar zip unzip && \ - mkdir -p /usr/share/maven /usr/share/maven/ref && \ - wget -e use_proxy=yes -e https_proxy=${HTTPS_PROXY} --no-cache --no-check-certificate ${MAVEN_BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz -O /tmp/apache-maven.tar.gz && \ - tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1 && \ - rm -f /tmp/apache-maven.tar.gz && \ - ln -s /usr/share/maven/bin/mvn /usr/bin/mvn && \ - mkdir -p /usr/share/ant && \ - wget -e use_proxy=yes -e https_proxy=${HTTPS_PROXY} --no-cache --no-check-certificate ${ANT_BASE_URL}/apache-ant-${ANT_VERSION}-bin.tar.gz -O /tmp/apache-ant.tar.gz && \ - tar -xzf /tmp/apache-ant.tar.gz -C /usr/share/ant --strip-components=1 && \ - ln -s /usr/share/ant/bin/ant /usr/bin/ant && \ - rm -f /tmp/apache-ant.tar.gz && \ - rm -f /opt/*.tar* && \ - mkdir -p /.m2 && \ - chgrp -R 0 /opt /root /usr/share /.m2 && \ - chmod -R g=u /opt /root /usr/share /.m2 && \ - chmod -R 775 /root /.m2 - -ENV JAVA_HOME=/opt/jdk1.8.0_251 -ENV JDK11_HOME=/opt/jdk-11.0.10 -ENV ANT_HOME=/usr/share/ant -ENV PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH - -CMD which mvn && mvn -version diff --git a/docker-images/README b/docker-images/README deleted file mode 100644 index af4525b..0000000 --- a/docker-images/README +++ /dev/null @@ -1,33 +0,0 @@ -This directory contains the Dockerfiles used for creating images used to run the JAF TCK tests in the Eclipse CI using Jenkins pipeline. --Use eclipse bugzilla (https://bugs.eclipse.org/bugs) to avail write permissions on any repositories in these docker hub organizations --If the images are required to be updated, create new tags(versions) of the same docker image ; it is possible to overwrite the existing image:version but not recommended. --If the docker image is updated with another version the same has to be updated in Jenkinsfile to use them in the CI runs. -===================================== - -Dockerfile1: - -Image - jakartaee/cts-jaf-base:0.1 - -Additional softwares to be downloaded --jdk-8u191-linux-x64.tar.gz - -Build command : docker build -t jakartaee/cts-jaf-base:0.1 -f Dockerfile1 . -Image push command : docker push jakartaee/cts-jaf-base:0.1 - -===================================== - -Dockerfile2: - -Image - jakartaee/cts-jaf-base:0.2 - -Additional softwares to be downloaded --jdk-11.0.10_linux-x64_bin.tar.gz --jdk-8u251-linux-x64.tar.gz - -JDK11_HOME will the available as JDK11 home path at /opt/jdk-11.0.10 - -Build command : docker build -t jakartaee/cts-jaf-base:0.2 -f Dockerfile2 . -Image push command : docker push jakartaee/cts-jaf-base:0.2 - -===================================== - diff --git a/docker/JTReportParser/JTReportParser.jar b/docker/JTReportParser/JTReportParser.jar deleted file mode 100755 index b2d2a47..0000000 Binary files a/docker/JTReportParser/JTReportParser.jar and /dev/null differ diff --git a/docker/JTReportParser/lib/commons-lang3-3.5.jar b/docker/JTReportParser/lib/commons-lang3-3.5.jar deleted file mode 100644 index 6328c8d..0000000 Binary files a/docker/JTReportParser/lib/commons-lang3-3.5.jar and /dev/null differ diff --git a/docker/JTReportParser/lib/jsoup-1.10.2.jar b/docker/JTReportParser/lib/jsoup-1.10.2.jar deleted file mode 100755 index 75f716b..0000000 Binary files a/docker/JTReportParser/lib/jsoup-1.10.2.jar and /dev/null differ diff --git a/docker/build_activationtck.sh b/docker/build_activationtck.sh deleted file mode 100755 index 388fc50..0000000 --- a/docker/build_activationtck.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash -x -# -# Copyright (c) 2018, 2021 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - - -export JAVA_HOME=${JDK11_HOME} -export PATH=$JAVA_HOME/bin:$PATH - - -echo "ANT_HOME=$ANT_HOME" -echo "export JAVA_HOME=$JAVA_HOME" -echo "export MAVEN_HOME=$MAVEN_HOME" -echo "export PATH=$PATH" - - -export TS_HOME=$WORKSPACE -sed -i "s#^TS_HOME=.*#TS_HOME=$TS_HOME#g" $TS_HOME/lib/ts.jte -sed -i "s#^JAVA_HOME=.*#JAVA_HOME=$JAVA_HOME#g" $TS_HOME/lib/ts.jte -sed -i "s#^JARPATH=.*#JARPATH=$TS_HOME#g" $TS_HOME/lib/ts.jte - -mkdir -p ${HOME}/.m2 - -cd $WORKSPACE - -if [ ! -z "$TCK_BUNDLE_BASE_URL" ]; then - #use pre-built tck bundle from this location to run test - mkdir -p ${WORKSPACE}/bundles - wget --progress=bar:force --no-cache ${TCK_BUNDLE_BASE_URL}/${TCK_BUNDLE_FILE_NAME} -O ${WORKSPACE}/bundles/${TCK_BUNDLE_FILE_NAME} - exit 0 -fi - -WGET_PROPS="--progress=bar:force --no-cache" -echo "$ACTIVATION_BUNDLE_URL" -if [ -z "$ACTIVATION_BUNDLE_URL" ];then - export ACTIVATION_BUNDLE_URL=https://jakarta.oss.sonatype.org/content/repositories/staging/com/sun/activation/jakarta.activation/2.0.0/jakarta.activation-2.0.0.jar -fi -wget $WGET_PROPS $ACTIVATION_BUNDLE_URL -O jakarta.activation.jar - -which ant -ant -version - -which mvn -mvn -version - -export ANT_OPTS="-DTS_HOME=$WORKSPACE -DJAVA_HOME=$JAVA_HOME -DJARPATH=$WORKSPACE" -export PATH="$JAVA_HOME/bin:$PATH" - -if [[ "$LICENSE" == "EFTL" || "$LICENSE" == "eftl" ]]; then - ant -f release.xml clean core -DuseEFTLicensefile="true" -else - ant -f release.xml clean core -fi -mkdir -p ${WORKSPACE}/bundles -chmod 777 ${WORKSPACE}/*.zip -for entry in `ls activation-*.zip`; do - strippedEntry=`basename "$entry" .zip` - if [[ "$LICENSE" == "EFTL" || "$LICENSE" == "eftl" ]]; then - echo "copying ${WORKSPACE}/$entry to ${WORKSPACE}/bundles/jakarta-$entry" - cp ${WORKSPACE}/$entry ${WORKSPACE}/bundles/jakarta-$entry - chmod 777 ${WORKSPACE}/bundles/jakarta-$entry - else - echo "copying ${WORKSPACE}/$entry to ${WORKSPACE}/bundles/$entry" - cp ${WORKSPACE}/$entry ${WORKSPACE}/bundles/$entry - chmod 777 ${WORKSPACE}/bundles/$entry - fi -done diff --git a/docker/run_activationtck.sh b/docker/run_activationtck.sh deleted file mode 100755 index e917722..0000000 --- a/docker/run_activationtck.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash -xe -# -# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - -if ls ${WORKSPACE}/bundles/*activation-tck*.zip 1> /dev/null 2>&1; then - echo "Using stashed bundle for activation-tck created during the build phase" - unzip -o ${WORKSPACE}/bundles/*activation-tck*.zip -d ${WORKSPACE} - TCK_NAME=activation-tck -elif ls ${WORKSPACE}/bundles/*jaftck*.zip 1> /dev/null 2>&1; then - echo "Using stashed bundle for jaftck created during the build phase" - unzip ${WORKSPACE}/bundles/*jaftck*.zip -d ${WORKSPACE} - TCK_NAME=jaftck -else - echo "[ERROR] TCK bundle not found" - exit 1 -fi - -export TS_HOME=${WORKSPACE}/${TCK_NAME} - - -if [[ "$JDK" == "JDK11" || "$JDK" == "jdk11" ]];then - export JAVA_HOME=${JDK11_HOME} - export PATH=$JAVA_HOME/bin:$PATH -fi - -WGET_PROPS="--progress=bar:force --no-cache" -if [ -z "$ACTIVATION_BUNDLE_URL" ];then - export ACTIVATION_BUNDLE_URL=https://jakarta.oss.sonatype.org/content/repositories/staging/com/sun/activation/jakarta.activation/2.0.0/jakarta.activation-2.0.0.jar -fi -wget $WGET_PROPS $ACTIVATION_BUNDLE_URL -O ${WORKSPACE}/jakarta.activation.jar - -sed -i "s#^TS_HOME=.*#TS_HOME=$TS_HOME#g" ${TS_HOME}/lib/ts.jte -sed -i "s#^JAVA_HOME=.*#JAVA_HOME=$JAVA_HOME#g" ${TS_HOME}/lib/ts.jte -sed -i "s#^JARPATH=.*#JARPATH=$WORKSPACE#g" ${TS_HOME}/lib/ts.jte - - -which ant -ant -version - -which java -java -version - -cd $TS_HOME -ant -Dreport.dir=$WORKSPACE/JTreport/${TCK_NAME} -Dwork.dir=$WORKSPACE/JTwork/${TCK_NAME} run - -HOST=`hostname -f` -echo "1 $TCK_NAME $HOST" > $WORKSPACE/args.txt - -mkdir -p $WORKSPACE/results/junitreports/ -JT_REPORT_DIR=$WORKSPACE/JTreport -$JAVA_HOME/bin/java -Djunit.embed.sysout=true -jar ${WORKSPACE}/docker/JTReportParser/JTReportParser.jar $WORKSPACE/args.txt $JT_REPORT_DIR $WORKSPACE/results/junitreports/ - -tar zcvf ${WORKSPACE}/${TCK_NAME}-results.tar.gz $WORKSPACE/JTreport/${TCK_NAME} $WORKSPACE/JTwork/${TCK_NAME} $WORKSPACE/results/junitreports/ diff --git a/harness/com/oracle/ts/lib/harness/TS.java b/harness/com/oracle/ts/lib/harness/TS.java deleted file mode 100644 index 4a86d86..0000000 --- a/harness/com/oracle/ts/lib/harness/TS.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.oracle.ts.lib.harness; - -import java.util.*; -import java.io.*; -import com.sun.javatest.finder.*; -import com.sun.javatest.*; -import com.sun.javatest.util.BackupPolicy; -import com.sun.interview.Interview; - -public class TS extends TestSuite { - private TestEnvironment env; - private boolean observerAdded; - - public TS(File root, Map tsInfo, ClassLoader cl) throws Fault { - super(root, tsInfo, cl); - } - - - public void starting(Harness harness) throws Fault { - if (observerAdded) { - return; - } - - harness.addObserver(new TSHarnessObserver()); - observerAdded = true; - } - -} diff --git a/harness/com/oracle/ts/lib/harness/TSHarnessObserver.java b/harness/com/oracle/ts/lib/harness/TSHarnessObserver.java deleted file mode 100644 index 0f7e86a..0000000 --- a/harness/com/oracle/ts/lib/harness/TSHarnessObserver.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.oracle.ts.lib.harness; - -import com.sun.javatest.*; -import java.io.*; -import java.net.*; -import java.util.*; - -/** - * This class is used to capture output from the tests (which goes to the .jtr - * files) and to also send it to the standard output stream if the test fails. - * - * @author Kyle Grucci - * @author Bill Shannon - */ -public class TSHarnessObserver - implements Harness.Observer, TestResult.Observer { - private static int iPassedCount; - private static int iFailedCount; - private static int iErrorCount; - private static int iNotRunCount; - private static int iFinishedTests; - private static List testResults = new ArrayList(); - private static StringBuilder msg; - private static PrintStream ps; - - private static final String BSEP = - "***************************************************************"; - private static final String SEP = - "---------------------------------------------------------------"; - - //------methods from Harness.Observer--------------------------------------- - - @Override - public void startingTestRun(com.sun.javatest.Parameters p) { - - System.out.println("Starting tests"); - } - - @Override - public void stoppingTestRun() {} - - @Override - public void finishedTestRun(boolean allOK) {} - - @Override - public synchronized void finishedTesting() { - if (testResults.size() == 0) - return; - - System.out.println(BSEP); - System.out.printf("Completed running %d tests.\n", iFinishedTests); - System.out.printf("Number of Tests Passed = %d%n", iPassedCount); - System.out.printf("Number of Tests Failed = %d%n", iFailedCount); - System.out.printf("Number of Tests with Errors = %d%n", iErrorCount); - System.out.printf("Number of Tests Not Run = %d%n", iNotRunCount); - - System.out.println(SEP); - for (String s : testResults) - System.out.println(s); - - testResults.clear(); - iFinishedTests = 0; - iPassedCount = 0; - iErrorCount = 0; - iNotRunCount = 0; - iFailedCount = 0; - } - - @Override - public void error(String s) { - //TestUtil.logHarness(s); - } - - @Override - public synchronized void startingTest(TestResult tr) { - TestDescription td = null; - try { - td = tr.getDescription(); - } catch (TestResult.Fault e) { - e.printStackTrace(); - } - - tr.addObserver(this); - System.out.println(BSEP); - System.out.printf("Beginning Test: %s%n", - testName(td.getParameter("executeClass"), td.getParameter("id"))); - msg = new StringBuilder(); - } - - @Override - public synchronized void finishedTest(TestResult tr) { - TestDescription td = null; - String clazz = ""; - String id = null; - try { - td = tr.getDescription(); - clazz = td.getParameter("executeClass"); - id = td.getParameter("id"); - } catch (TestResult.Fault e) { - e.printStackTrace(); - } - - boolean passed = false; - String testNameAndStatus = ""; - switch (tr.getStatus().getType()) { - case Status.PASSED: - testNameAndStatus = "PASSED........" + testName(clazz, id); - iPassedCount++; - passed = true; - break; - case Status.ERROR: - testNameAndStatus = "ERROR........" + testName(clazz, id); - iErrorCount++; - break; - case Status.NOT_RUN: - testNameAndStatus = "NOT RUN........" + testName(clazz, id); - iNotRunCount++; - break; - default: - testNameAndStatus = "FAILED........" + testName(clazz, id); - iFailedCount++; - break; - } - testResults.add(testNameAndStatus); - iFinishedTests++; - - System.out.println(SEP); - System.out.printf("Finished Test: %s%n", testNameAndStatus); - System.out.println(SEP); - - // only print test output for tests that fail - if (!passed) { - System.out.print(msg.toString()); - System.out.println(SEP); - } - System.out.printf("Number of tests completed: %d " + - "(%d pass, %d fail, %d errors)%n", - iFinishedTests, iPassedCount, iFailedCount, iErrorCount); - } - - private static String testName(String clazz, String id) { - return clazz.replace('.', '/') + ".java" + - (id == null ? "" : ("#" + id)); - } - - //------methods from TestResult.Observer---------------------------------- - - @Override - public void createdSection(TestResult tr, TestResult.Section section) {} - - @Override - public void completedSection(TestResult tr, TestResult.Section section) {} - - @Override - public void createdOutput(TestResult tr, TestResult.Section section, - String outputName) {} - - @Override - public void completedOutput(TestResult tr, TestResult.Section section, - String outputName) {} - - @Override - public void updatedOutput(TestResult tr, TestResult.Section section, - String outputName, int start, int end, String text) { - msg.append(text); - } - - @Override - public void updatedProperty(TestResult tr, String name, String value) {} - - @Override - public void completed(TestResult tr) {} -} diff --git a/javatest.jar b/javatest.jar deleted file mode 100644 index 58e222d..0000000 Binary files a/javatest.jar and /dev/null differ diff --git a/lib/ts.jte b/lib/ts.jte deleted file mode 100644 index ca99cd1..0000000 --- a/lib/ts.jte +++ /dev/null @@ -1,157 +0,0 @@ -# -# Copyright (c) 2018, 2019 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -######################################################################### -# # -# JavaTest Environment file for TCK # -# # -# The platform specific environments in this file will likely # -# have to be modified during installation of the TCK. # -# You can modify values inline, here, or you can override them in # -# a separate file, and give both files to JavaTest. # -# # -######################################################################### - -# User defined environment variables - -# Set this to your TCK installation directory. - -# Use this style naming convention for Windows. -##TS_HOME=D:\\tck\\jaftck - -# And this style naming convention for UNIX. -# TS_HOME=/home/abc/jaftck -TS_HOME=MUST-BE-SET - -# Set this to the installation of your JDK. - -##JAVA_HOME=D:\\jdk-11 -##JAVA_HOME=/usr/jdk-11 -JAVA_HOME=MUST-BE-SET - -# Set this to the directory containing the Activation .jar -# file (i.e., jakarta.activation-api.jar) -JARPATH=MUST-BE-SET - -# Adjust these as necessary for Windows or UNIX - -# Set the path to the jakarta.activation-api.jar -#API_JAR=${JARPATH}\\jakarta.activation-api.jar -API_JAR=${JARPATH}/jakarta.activation-api.jar - -# Set the Activation implementation path -##LOCAL_CLASSES=$JARPATH\\angus-activation.jar -LOCAL_CLASSES=$JARPATH/angus-activation.jar - -##TESTCLASS=$TS_HOME\\classes -TESTCLASS=$TS_HOME/classes - -##extraOtherJVMClassPath=$TS_HOME\\sigtest.jar;$LOCAL_CLASSES;$TESTCLASS -extraOtherJVMClassPath=$TS_HOME/sigtest.jar:$LOCAL_CLASSES:$TESTCLASS - -##javatestClassDir=$TS_HOME\\javatest.jar -javatestClassDir=$TS_HOME/javatest.jar - -##SYSTEMROOT=C:\\WINNT - -# Directory to store the input files or data for the TCK tests -# This should be set to the installation /tests/testdata -#JAVAMAIL_TESTDATA_DIR=$TS_HOME\\tests\\testdata -JAVAMAIL_TESTDATA_DIR=$TS_HOME/tests/testdata - -#Test URL for signature tests. -# This should be set to the installation /tests -testURL=file://$TS_HOME/tests - - -# Shorthand forms, for convenience. -# These should not need to be changed. - -# TestFinder macros -TCKTestFinder=com.sun.javatest.finder.HTMLTestFinder - -# Script macros -TCKScript=com.sun.javatest.lib.StdTestScript -TCKReportScript=com.sun.javatest.lib.ReportScript - -# Command Macros -ExecTCKTestOtherJVMCmd=com.sun.javatest.lib.ExecStdTestOtherJVMCmd -JDKCompileCommand=com.sun.javatest.lib.JavaCompileCommand -ProcessCommand=com.sun.javatest.lib.ProcessCommand - -#---------- "Reporting" environment -------------------------------------------- - - -# Use this environment to report on previously executed tests -# without running them again. You can select a different set -# of tests than that previously run: e.g. to do a big run, -# break it in pieces, run the pieces separately, and then -# do a single report of all tests using this environment. - -# Environment jck-report -# -env.jck-report.description=Report on previously executed tests -env.jck-report.finder=$TCKTestFinder -env.jck-report.script=$TCKReportScript - - - -#---------- JDK/UNIX configuration ------------------------------------------ - -# Environment jafUnix -# -env.jafUnix.description=\ - Run the runtime tests in a separate JVM (process) on UNIX -env.jafUnix.finder=$TCKTestFinder -env.jafUnix.script=$TCKScript - -# -# The runtime to be tested ... -# -env.jafUnix.command.execute=$ExecTCKTestOtherJVMCmd \ - CLASSPATH=$testSuiteRootDir/../classes$:$testClassDir:\ - $javatestClassDir$:$extraOtherJVMClassPath \ - HOME=${user.home} \ - $JAVA_HOME/bin/java --add-modules ALL-MODULE-PATH --module-path $API_JAR -verify $testExecuteClass $testExecuteArgs $testDebug - - -#---------- JDK/Windows NT configuration --------------------------------------- - -# Environment jafWindows -# -env.jafWindows.description=\ - Run the runtime tests in a separate JVM (process) on Windows NT -env.jafWindows.finder=$TCKTestFinder -env.jafWindows.script=$TCKScript - -# -# -# This environment will run the runtime tests -# in a separate JVM (process) on Windows NT. -# -# The runtime to be tested ... -# The SystemRoot variable should be set to the Windows NT system -# installation directory. -# -# You can either set the value of SystemRoot explicitly, or you can set it to -# refer to a system property that you set on the command line when you start -# JavaTest, which might in turn be set from your Windows NT SystemRoot variable. -# -env.jafWindows.command.execute=$ExecTCKTestOtherJVMCmd \ - CLASSPATH=$testSuiteRootDir$/..$/classes$:$javatestClassDir$:$extraOtherJVMClassPath \ - SystemRoot=${SYSTEMROOT} \ - windir=${SYSTEMROOT} \ - $JAVA_HOME$/bin$/java --add-modules ALL-MODULE-PATH --module-path $API_JAR -verify $testExecuteClass $testExecuteArgs $testDebug diff --git a/lib/ts.jti b/lib/ts.jti deleted file mode 100644 index b423f5c..0000000 --- a/lib/ts.jti +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (c) 2018, 2019 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -#JavaTest Harness Configuration Interview -#Wed Nov 14 16:21:21 EST 2012 -DESCRIPTION=Run the runtime tests in a separate JVM (process) on Solaris -INTERVIEW=com.sun.javatest.interview.LegacyParameters -LOCALE=en_US -NAME=jafUnix -QUESTION=jtwiz.knownFailuresList.needKfl -TESTSUITE=tests -WORKDIR=JTwork -jtwiz.concurrency.concurrency=1 -jtwiz.environment.env=jafUnix -jtwiz.environment.envFiles=../lib/jaf.jte -jtwiz.excludeList.customFiles=../lib/jaf.jtx -jtwiz.excludeList.latestAutoCheck=No -jtwiz.excludeList.latestAutoCheckInterval=7 -jtwiz.excludeList.latestAutoCheckMode=everyXDays -jtwiz.excludeList.needExcludeList=Yes -jtwiz.keywords.keywords.mode=expr -jtwiz.keywords.needKeywords=No -jtwiz.knownFailuresList.needKfl=No -jtwiz.priorStatus.needStatus=No -jtwiz.priorStatus.status= -jtwiz.tests.needTests=No -jtwiz.tests.tests= -jtwiz.tests.treeOrFile=tree -jtwiz.timeout.timeout=1 diff --git a/lib/ts.jtx b/lib/ts.jtx deleted file mode 100644 index 2430815..0000000 --- a/lib/ts.jtx +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (c) 2018, 2019 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -# exclude the following tests -api/javasoft/sqe/tests/jakarta/activation/CommandMap/testlist.html#createDataContentHandler_Test diff --git a/release.xml b/release.xml deleted file mode 100644 index acf0146..0000000 --- a/release.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sigtest.jar b/sigtest.jar deleted file mode 100644 index e917d6a..0000000 Binary files a/sigtest.jar and /dev/null differ diff --git a/sigtestdev.jar b/sigtestdev.jar deleted file mode 100644 index 2317358..0000000 Binary files a/sigtestdev.jar and /dev/null differ diff --git a/tck-run/pom.xml b/tck-run/pom.xml new file mode 100644 index 0000000..0542403 --- /dev/null +++ b/tck-run/pom.xml @@ -0,0 +1,68 @@ + + + + + 4.0.0 + + jakarta.activation + jakarta.activation-tck-run + 1.0.0-SNAPSHOT + pom + + + tck-tests + tck-tests-pluggability + + + + UTF-8 + 11 + 11 + 1.0.0-SNAPSHOT + 2.1.0-SNAPSHOT + 5.8.1 + + + + + jakarta.activation + jakarta.activation-api + ${activation.version} + + + org.junit.jupiter + junit-jupiter + ${jupiter-api.version} + test + + + + + + + + maven-surefire-plugin + 3.0.0-M5 + + + + + diff --git a/tck-run/tck-tests-pluggability/pom.xml b/tck-run/tck-tests-pluggability/pom.xml new file mode 100644 index 0000000..d046f2c --- /dev/null +++ b/tck-run/tck-tests-pluggability/pom.xml @@ -0,0 +1,55 @@ + + + + + 4.0.0 + + + jakarta.activation + jakarta.activation-tck-run + 1.0.0-SNAPSHOT + + + jakarta.activation-tck-run-tests-pluggability + + + + jakarta.activation + jakarta.activation-tck-tests-pluggability + ${activation-tck.version} + + + + + + + maven-surefire-plugin + + + jakarta.activation:jakarta.activation-tck-tests-pluggability + + false + false + + + + + diff --git a/tck-run/tck-tests/pom.xml b/tck-run/tck-tests/pom.xml new file mode 100644 index 0000000..c0a8770 --- /dev/null +++ b/tck-run/tck-tests/pom.xml @@ -0,0 +1,69 @@ + + + + + 4.0.0 + + + jakarta.activation + jakarta.activation-tck-run + 1.0.0-SNAPSHOT + + + jakarta.activation-tck-run-tests + + + 1.0.0-SNAPSHOT + + + + + jakarta.activation + jakarta.activation-tck-tests + ${activation-tck.version} + test + + + org.eclipse.angus + angus-activation + ${angus.activation.version} + test + + + + + + + maven-surefire-plugin + + + jakarta.activation:jakarta.activation-tck-tests + + false + true + 1 + false + + + + + diff --git a/tck/pom.xml b/tck/pom.xml new file mode 100644 index 0000000..f5a7d5b --- /dev/null +++ b/tck/pom.xml @@ -0,0 +1,85 @@ + + + + 4.0.0 + + jakarta.activation + jakarta.activation-tck + 1.0.0-SNAPSHOT + pom + + + tck-common + tck-tests + tck-tests-pluggability + + + Activation TCK + Activation TCK + + + + Eclipse Public License 2.0 + https://projects.eclipse.org/license/epl-2.0 + repo + + + GNU General Public License, version 2 with the GNU Classpath Exception + https://projects.eclipse.org/license/secondary-gpl-2.0-cp + repo + + + + + UTF-8 + 11 + 11 + 2.1.0-RC1 + 5.7.2 + 1.4 + + + + + jakarta.activation + jakarta.activation-api + ${activation.version} + provided + + + org.junit.jupiter + junit-jupiter + ${jupiter-api.version} + provided + + + org.netbeans.tools + sigtest-maven-plugin + ${sigtest.version} + + + org.netbeans.tools + ct-sym + + + + + diff --git a/tests/testsuite.html b/tck/tck-common/pom.xml similarity index 50% rename from tests/testsuite.html rename to tck/tck-common/pom.xml index 3593173..624cf26 100644 --- a/tests/testsuite.html +++ b/tck/tck-common/pom.xml @@ -1,8 +1,7 @@ - - + + + 4.0.0 -jakarta.activation testsuite - + + jakarta.activation + jakarta.activation-tck + 1.0.0-SNAPSHOT + - + jakarta.activation-tck-common + jar -

jakarta.activation testsuite

-

- -Listed below are jakarta.activation components that we have API tests for. - -

-
- -

Component Specific Tests

-
-
SignatureTest -
javax -
Tests for jakarta.activation packages -

- -
-
-
- - - +
diff --git a/tck/tck-common/src/main/java/com/sun/javatest/Status.java b/tck/tck-common/src/main/java/com/sun/javatest/Status.java new file mode 100644 index 0000000..ec5a0a1 --- /dev/null +++ b/tck/tck-common/src/main/java/com/sun/javatest/Status.java @@ -0,0 +1,237 @@ +/* + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.javatest; + +public class Status { + public static final int PASSED = 0; + public static final int FAILED = 1; + public static final int ERROR = 2; + public static final int NOT_RUN = 3; + public static final int NUM_STATES = 4; + private final int type; + private final String reason; + public static final String EXIT_PREFIX = "STATUS:"; + private static String[] texts = new String[]{"Passed.", "Failed.", "Error.", "Not run."}; + public static final int[] exitCodes = new int[]{95, 97, 98, 99}; + private static final String ENC_PREFFIX = ""; + private static final String ENC_SUFFFIX = ""; + private static final String ENC_SEPARATOR = " "; + + public static Status passed(String reason) { + return new Status(0, reason); + } + + public static Status failed(String reason) { + return new Status(1, reason); + } + + public static Status error(String reason) { + return new Status(2, reason); + } + + public static Status notApplicable(String reason) { + return new Status(1, "Not Applicable: " + reason); + } + + static Status notRun(String reason) { + return new Status(3, reason); + } + + public boolean isPassed() { + return this.type == 0; + } + + public boolean isFailed() { + return this.type == 1; + } + + public boolean isError() { + return this.type == 2; + } + + public boolean isNotRun() { + return this.type == 3; + } + + public int getType() { + return this.type; + } + + public String getReason() { + return this.reason; + } + + public Status augment(String aux) { + if (aux == null || aux.length() == 0) { + return this; + } + return new Status(this.type, this.reason + " [" + aux + "]"); + } + + public Status augment(Status aux) { + return aux == null ? this : this.augment(aux.reason); + } + + public static Status parse(String s) { + try { + return new Status(Status.decode(s)); + } + catch (IllegalArgumentException e) { + return null; + } + } + + private Status(String s) { + for (int t = 0; t < texts.length; ++t) { + if (!s.startsWith(texts[t])) continue; + int l = texts[t].length(); + String r = l < s.length() ? (s.charAt(l) == ' ' ? s.substring(l + 1) : s.substring(l)) : ""; + this.type = t; + this.reason = Status.normalize(r); + return; + } + throw new IllegalArgumentException(); + } + + public String toString() { + if (this.reason == null || this.reason.length() == 0) { + return texts[this.type]; + } + return texts[this.type] + ENC_SEPARATOR + this.reason; + } + + public static String typeToString(int typeNum) { + if (typeNum < 4) { + return texts[typeNum]; + } + return null; + } + + public void exit() { + if (System.err != null) { + System.err.print(EXIT_PREFIX); + System.err.print(texts[this.type]); + System.err.println(Status.encode(this.reason)); + System.err.flush(); + } + System.exit(exitCodes[this.type]); + } + + public Status(int type, String reason) throws IllegalArgumentException { + if (type < 0 || type >= 4) { + throw new IllegalArgumentException(String.valueOf(type)); + } + this.type = type; + this.reason = Status.normalize(reason); + } + + private static String normalize(String msg) { + boolean ok = true; + boolean prevIsWhite = false; + for (int i = 0; ok && i < msg.length(); ++i) { + char ch = msg.charAt(i); + if (Character.isWhitespace(ch)) { + if (prevIsWhite || ch != ' ' || i == 0) { + ok = false; + break; + } + prevIsWhite = true; + continue; + } + prevIsWhite = false; + } + if (prevIsWhite) { + ok = false; + } + if (ok) { + return msg; + } + StringBuffer sb = new StringBuffer(); + boolean needWhite = false; + for (int i = 0; i < msg.length(); ++i) { + char ch = msg.charAt(i); + if (Character.isWhitespace(ch)) { + if (sb.length() <= 0) continue; + needWhite = true; + continue; + } + if (needWhite) { + sb.append(' '); + } + sb.append(ch); + needWhite = false; + } + return sb.toString(); + } + + private static final boolean isPrintable(char c) { + return ' ' <= c && c < ''; + } + + public static String encode(String str) { + if (str == null) { + return null; + } + boolean isAscii = true; + for (int i = 0; i < str.length(); ++i) { + if (Status.isPrintable(str.charAt(i))) continue; + isAscii = false; + break; + } + if (isAscii) { + return str; + } + StringBuffer sb = new StringBuffer(); + sb.append(ENC_PREFFIX); + for (int i = 0; i < str.length(); ++i) { + sb.append(Status.encodeChar(str.charAt(i))); + sb.append(ENC_SEPARATOR); + } + sb.append(ENC_SUFFFIX); + return sb.toString(); + } + + public static String decode(String str) { + if (str == null) { + return null; + } + int ind = str.indexOf(ENC_PREFFIX); + if (ind < 0 || !str.endsWith(ENC_SUFFFIX)) { + return str; + } + String encoded = str.substring(ind + ENC_PREFFIX.length(), str.length() - ENC_SUFFFIX.length()); + StringBuffer sb = new StringBuffer(); + sb.append(str.substring(0, ind)); + int begin = 0; + int end = encoded.indexOf(ENC_SEPARATOR); + while (end >= 0) { + sb.append(Status.decodeChar(encoded.substring(begin, end))); + begin = end + ENC_SEPARATOR.length(); + end = encoded.indexOf(ENC_SEPARATOR, begin); + } + sb.append(encoded.substring(begin)); + return sb.toString(); + } + + private static final String encodeChar(char c) { + return Integer.toString(c, 16); + } + + private static final char decodeChar(String s) { + return (char)Integer.parseInt(s, 16); + } +} \ No newline at end of file diff --git a/tck/tck-tests-pluggability/pom.xml b/tck/tck-tests-pluggability/pom.xml new file mode 100644 index 0000000..30aa0d6 --- /dev/null +++ b/tck/tck-tests-pluggability/pom.xml @@ -0,0 +1,41 @@ + + + + 4.0.0 + + + jakarta.activation + jakarta.activation-tck + 1.0.0-SNAPSHOT + + + jakarta.activation-tck-tests-pluggability + jar + + + + jakarta.activation + jakarta.activation-tck-common + ${project.version} + + + + diff --git a/tck/tck-tests/pom.xml b/tck/tck-tests/pom.xml new file mode 100644 index 0000000..c2af6eb --- /dev/null +++ b/tck/tck-tests/pom.xml @@ -0,0 +1,41 @@ + + + + 4.0.0 + + + jakarta.activation + jakarta.activation-tck + 1.0.0-SNAPSHOT + + + jakarta.activation-tck-tests + jar + + + + jakarta.activation + jakarta.activation-tck-common + ${project.version} + + + + diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/ActivationDataFlavor_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/ActivationDataFlavor_Test.java similarity index 77% rename from tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/ActivationDataFlavor_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/ActivationDataFlavor_Test.java index 4fe685b..1949e40 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/ActivationDataFlavor_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/ActivationDataFlavor_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.ActivationDataFlavor; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.ActivationDataFlavor; /** * Here we test the three ActivationDataFlavor(..) constructors. @@ -28,30 +31,28 @@ * testcase passes otherwise it fails. */ -public class ActivationDataFlavor_Test extends MultiTest { - - // main - public static void main(String[] args) - { - Test t = new ActivationDataFlavor_Test(); - Status s = t.run(args, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - s.exit(); - } +public class ActivationDataFlavor_Test { // Tests for ActivationDataFlavor constructors: - public Status testForActivationDF1() + @Test + public void testForActivationDF1() { - return callADF_1("text/plain", "text/plain", true); + Status s = callADF_1("text/plain", "text/plain", true); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } - public Status testForActivationDF2() + @Test + public void testForActivationDF2() { - return callADF_2(); + Status s = callADF_2(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } - public Status testForActivationDF3() + @Test + public void testForActivationDF3() { - return callADF_3(); + Status s = callADF_3(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } // private implementation methods diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/equals_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/equals_Test.java similarity index 57% rename from tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/equals_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/equals_Test.java index 620870d..09da36b 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/equals_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/equals_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.ActivationDataFlavor; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.ActivationDataFlavor; /** * We test the 'equals(ActivationDataFlavor)' by passing it ActivationDataFlavor object, @@ -27,40 +30,40 @@ * We test by using equal/not-equal parameter values. */ -public class equals_Test extends MultiTest { - - // main - public static void main(String[] args) - { - Test t = new equals_Test(); - Status s = t.run(args, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - s.exit(); - } +public class equals_Test { // Tests for equals: - public Status testForEquals() + @Test + public void testForEquals() { - return callADFEquals("text/plain", "text/plain", true); + Status s = callADFEquals("text/plain", "text/plain", true); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } // Tests for not equals: - public Status testForNotEquals() + @Test + public void testForNotEquals() { - return callADFEquals("text/plain", "image/gif", false); + Status s = callADFEquals("text/plain", "image/gif", false); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } // Test for equals with params - public Status testForEqualsParams() + @Test + public void testForEqualsParams() { - return callADFEquals("text/plain; charset=us-ascii; x-java-view=Viewer", - "text/plain; x-java-view=Viewer; charset=us-ascii", true); + Status s = callADFEquals("text/plain; charset=us-ascii; x-java-view=Viewer", + "text/plain; x-java-view=Viewer; charset=us-ascii", true); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } // Test for not equals with params - public Status testForNotEqualsParams() + @Test + public void testForNotEqualsParams() { - return callADFEquals("text/plain; charset=us-ascii; x-java-view=Viewer", - "text/plain; x-java-view=Viewer", true); + Status s = callADFEquals("text/plain; charset=us-ascii; x-java-view=Viewer", + "text/plain; x-java-view=Viewer", true); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } // private implementation methods diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/getHumanPresentableName_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/getHumanPresentableName_Test.java similarity index 73% rename from tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/getHumanPresentableName_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/getHumanPresentableName_Test.java index a3273ff..b9f16a9 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/getHumanPresentableName_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/getHumanPresentableName_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.ActivationDataFlavor; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.ActivationDataFlavor; /** * We first create an object of type ActivationDataFlavor, then @@ -28,18 +31,15 @@ * constructor then this testcase passes otherwise it fails. */ -public class getHumanPresentableName_Test extends MultiTest { +public class getHumanPresentableName_Test { - // main - public static void main(String[] args) - { - Test t = new getHumanPresentableName_Test(); - Status s = t.run(args, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - s.exit(); + @Test + public void run() { + Status s = testGetHumanPresentableName(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } - // Tests for equals: - public Status testGetHumanPresentableName() + private Status testGetHumanPresentableName() { String humanName = "TextPlain DataFlavor"; diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/getMimeType_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/getMimeType_Test.java similarity index 72% rename from tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/getMimeType_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/getMimeType_Test.java index 249d793..adb7c56 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/getMimeType_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/getMimeType_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.ActivationDataFlavor; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.ActivationDataFlavor; /** * Create a ActivationDataFlavor object with mimeType. Then call @@ -27,18 +30,16 @@ * then this testcase passes otherwise it fails. */ -public class getMimeType_Test extends MultiTest { +public class getMimeType_Test { - // main - public static void main(String[] args) - { - Test t = new getMimeType_Test(); - Status s = t.run(args, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - s.exit(); + @Test + public void run() { + Status s = testGetMimeType(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } // Tests for equals: - public Status testGetMimeType() + private Status testGetMimeType() { String mimeType = "text/plain"; diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/getRepresentationClass_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/getRepresentationClass_Test.java similarity index 73% rename from tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/getRepresentationClass_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/getRepresentationClass_Test.java index 1b5f7a0..589f4f4 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/getRepresentationClass_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/getRepresentationClass_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.ActivationDataFlavor; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.ActivationDataFlavor; /** * We first create an object of type ActivationDataFlavor(Class,String), @@ -28,18 +31,16 @@ * constructor then this testcase passes otherwise it fails. */ -public class getRepresentationClass_Test extends MultiTest { +public class getRepresentationClass_Test { - // main - public static void main(String[] args) - { - Test t = new getRepresentationClass_Test(); - Status s = t.run(args, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - s.exit(); + @Test + public void run() { + Status s = testGetRepresentationClass(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } // Tests for equals: - public Status testGetRepresentationClass() + private Status testGetRepresentationClass() { String humanName = "Human Presentable Name"; Class myClass = humanName.getClass(); diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/isMimeTypeEqual_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/isMimeTypeEqual_Test.java similarity index 56% rename from tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/isMimeTypeEqual_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/isMimeTypeEqual_Test.java index 905b229..c2387b3 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/isMimeTypeEqual_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/isMimeTypeEqual_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.ActivationDataFlavor; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.ActivationDataFlavor; /** * We test the isMimeTypeEqual(string) by passing it string objects, @@ -27,40 +30,40 @@ * We test by using equal/not-equal parameter values. */ -public class isMimeTypeEqual_Test extends MultiTest { - - // main - public static void main(String[] args) - { - Test t = new isMimeTypeEqual_Test(); - Status s = t.run(args, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - s.exit(); - } +public class isMimeTypeEqual_Test { // Tests for equals: - public Status testForEquals() + @Test + public void testForEquals() { - return callADFEquals("text/plain", "text/plain", true); + Status s = callADFEquals("text/plain", "text/plain", true); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } // Tests for not equals: - public Status testForNotEquals() + @Test + public void testForNotEquals() { - return callADFEquals("text/plain", "image/gif", false); + Status s = callADFEquals("text/plain", "image/gif", false); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } // Test for equals with params - public Status testForEqualsParams() + @Test + public void testForEqualsParams() { - return callADFEquals("text/plain; charset=us-ascii; x-java-view=Viewer", - "text/plain; x-java-view=Viewer; charset=us-ascii", true); + Status s = callADFEquals("text/plain; charset=us-ascii; x-java-view=Viewer", + "text/plain; x-java-view=Viewer; charset=us-ascii", true); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } // Test for not equals with params - public Status testForNotEqualsParams() + @Test + public void testForNotEqualsParams() { - return callADFEquals("text/plain; charset=us-ascii; x-java-view=Viewer", - "text/plain; x-java-view=Viewer", true); + Status s = callADFEquals("text/plain; charset=us-ascii; x-java-view=Viewer", + "text/plain; x-java-view=Viewer", true); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } // private implementation methods diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/normalizeMimeTypeParameter_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/normalizeMimeTypeParameter_Test.java similarity index 74% rename from tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/normalizeMimeTypeParameter_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/normalizeMimeTypeParameter_Test.java index b90c5c2..2bfde1a 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/normalizeMimeTypeParameter_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/normalizeMimeTypeParameter_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,12 +16,15 @@ package javasoft.sqe.tests.api.jakarta.activation.ActivationDataFlavor; -import java.io.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + import java.util.Locale; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestActivationDataFlavor; /** * We create a TestActivationDataFlavor object then invoke @@ -30,18 +33,17 @@ * string value then this testcase passes, otherwsie it fails. */ -public class normalizeMimeTypeParameter_Test extends MultiTest { +public class normalizeMimeTypeParameter_Test { - // main - public static void main(String[] args) + @Test + public void run() { - Test t = new normalizeMimeTypeParameter_Test(); - Status s = t.run(args, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - s.exit(); + Status s = testNormalizeMimeTypeParameter(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } // Tests for equals: - public Status normalizeMimeTypeParameter() + private Status testNormalizeMimeTypeParameter() { String parameterName = "charset"; String parameterValue = "US-ASCII"; diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/normalizeMimeType_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/normalizeMimeType_Test.java similarity index 72% rename from tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/normalizeMimeType_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/normalizeMimeType_Test.java index 2a761cc..117ec59 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/normalizeMimeType_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/normalizeMimeType_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,11 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.ActivationDataFlavor; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestActivationDataFlavor; /** * We create a TestActivationDataFlavor object then invoke @@ -29,18 +31,17 @@ * string value then this testcase passes, otherwsie it fails. */ -public class normalizeMimeType_Test extends MultiTest { +public class normalizeMimeType_Test { - // main - public static void main(String[] args) - { - Test t = new normalizeMimeType_Test(); - Status s = t.run(args, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - s.exit(); + @Test + public void run() + { + Status s = testNormalizeMimeType(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } // Tests for equals: - public Status normalizeMimeType() + public Status testNormalizeMimeType() { String mimeType = "text/plain"; String expectedValue = mimeType; diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/setHumanPresentableName_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/setHumanPresentableName_Test.java similarity index 79% rename from tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/setHumanPresentableName_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/setHumanPresentableName_Test.java index e64e205..9dc0cf5 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/setHumanPresentableName_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/ActivationDataFlavor/setHumanPresentableName_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.ActivationDataFlavor; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.ActivationDataFlavor; /** * We first create an object of type ActivationDataFlavor, then call @@ -29,14 +32,13 @@ * passes otherwise it fails. */ -public class setHumanPresentableName_Test extends MultiTest { +public class setHumanPresentableName_Test { - // main - public static void main(String[] args) - { - Test t = new setHumanPresentableName_Test(); - Status s = t.run(args, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - s.exit(); + @Test + public void run() + { + Status s = testSetHumanPresentableName(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandInfo/CommandInfo_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandInfo/CommandInfo_Test.java similarity index 73% rename from tests/api/javasoft/sqe/tests/jakarta/activation/CommandInfo/CommandInfo_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandInfo/CommandInfo_Test.java index 854a959..af45c38 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandInfo/CommandInfo_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandInfo/CommandInfo_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.CommandInfo; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.CommandInfo; /** FileTypeMap is an abstract class. The main functional testing is in the only provided * concrete implementation, MimetypesFileTypeMap, tested separately.

@@ -27,36 +30,29 @@ * initiates objects of type CommandInfo then testcase passes otherwise it fails. */ -public class CommandInfo_Test implements Test +public class CommandInfo_Test { private String message = null; - private DataHandler dh = null; - public PrintWriter outLog; - public PrintWriter outConsole; - public Status status; + public Status status; - public static void main(String argv[]) + @Test + public void run() + { + Status s = test(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); + } + + public Status test() { - CommandInfo_Test lTest = new CommandInfo_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); - } - - public Status run(String argv[], PrintWriter outLog, PrintWriter outConsole) - { - this.outLog = outLog; // Test with a CommandObject String verb = "view"; String className = "javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandObject"; - outLog.println("UNIT TEST: CommandInfo(verb, className)"); - CommandInfo cInfo = new CommandInfo(verb, className); // API TEST if (!validateInfo(cInfo, verb, className)) return Status.failed(message); - outLog.println("UNIT TEST: passed\n"); status = Status.passed("CommandInfo Test succeeded"); return status; } diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandInfo/getCommandClass_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandInfo/getCommandClass_Test.java similarity index 77% rename from tests/api/javasoft/sqe/tests/jakarta/activation/CommandInfo/getCommandClass_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandInfo/getCommandClass_Test.java index 31c616c..cbc660b 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandInfo/getCommandClass_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandInfo/getCommandClass_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.CommandInfo; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.CommandInfo; /** FileTypeMap is an abstract class. The main functional testing is in the only * provided concrete implementation, MimetypesFileTypeMap, tested separately.

@@ -27,19 +30,18 @@ * otherwise it fails. */ -public class getCommandClass_Test implements Test +public class getCommandClass_Test { private String message = null; - public PrintWriter outConsole; - public static void main(String argv[]) - { - getCommandClass_Test lTest = new getCommandClass_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); - } + @Test + public void run() + { + Status s = test(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); + } - public Status run(String argv[], PrintWriter outLog, PrintWriter outConsole) + public Status test() { // Test with a CommandObject String verb = "view"; diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandInfo/getCommandName_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandInfo/getCommandName_Test.java similarity index 71% rename from tests/api/javasoft/sqe/tests/jakarta/activation/CommandInfo/getCommandName_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandInfo/getCommandName_Test.java index fca48ba..c697c52 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandInfo/getCommandName_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandInfo/getCommandName_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.CommandInfo; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.CommandInfo; /** FileTypeMap is an abstract class. The main functional testing is in the only * provided concrete implementation, MimetypesFileTypeMap, tested separately.

@@ -27,34 +30,28 @@ * api if it returns the expected value then this testcase passes otherwsie it fails. */ -public class getCommandName_Test implements Test +public class getCommandName_Test { private String message = null; - public PrintWriter outLog; - public PrintWriter outConsole; - public static void main(String argv[]) - { - getCommandName_Test lTest = new getCommandName_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); - } + @Test + public void run() + { + Status s = test(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); + } - public Status run(String argv[], PrintWriter outLog, PrintWriter outConsole) + public Status test() { - this.outLog = outLog; // Test with a CommandObject String verb = "view"; String className = "javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandObject"; CommandInfo cInfo = new CommandInfo(verb, className); - outLog.println("UNIT TEST: getCommandName()"); - if (!validateInfo(cInfo, verb, className)) return Status.failed(message); - outLog.println("UNIT TEST: passed\n"); return Status.passed("getCommandName() Test succeeded"); } diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandInfo/getCommandObject_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandInfo/getCommandObject_Test.java similarity index 87% rename from tests/api/javasoft/sqe/tests/jakarta/activation/CommandInfo/getCommandObject_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandInfo/getCommandObject_Test.java index 3236b7f..9f6a69f 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandInfo/getCommandObject_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandInfo/getCommandObject_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,13 +16,21 @@ package javasoft.sqe.tests.api.jakarta.activation.CommandInfo; -import java.io.*; -import java.net.URL; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; import java.net.MalformedURLException; +import java.net.URL; import java.net.URLClassLoader; -import jakarta.activation.*; -import com.sun.javatest.*; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.CommandInfo; +import jakarta.activation.CommandObject; +import jakarta.activation.DataHandler; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestNoBeans; /** * Create a CommandInfo object using one its contructors, then invoke @@ -30,23 +38,20 @@ * passes otherwise it fails. */ -public class getCommandObject_Test implements Test +public class getCommandObject_Test { private String message = null; private DataHandler dh = null; - public PrintWriter outLog; - public PrintWriter outConsole; - public static void main(String argv[]) - { - getCommandObject_Test lTest = new getCommandObject_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); - } + @Test + public void run() + { + Status s = test(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); + } - public Status run(String argv[], PrintWriter outLog, PrintWriter outConsole) + public Status test() { - this.outLog = outLog; // Test with a CommandObject String verb = "view"; String className = "javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandObject"; @@ -57,7 +62,6 @@ public Status run(String argv[], PrintWriter outLog, PrintWriter outConsole) return Status.failed(message); Object obj = null; - outLog.println("UNIT TEST 1: getCommandObject(DataHandler, ClassLoader)"); try { obj = cInfo.getCommandObject(dh, this.getClass().getClassLoader()); // API TEST @@ -67,10 +71,6 @@ public Status run(String argv[], PrintWriter outLog, PrintWriter outConsole) return Status.failed("getCommandObject() unexpected throw: " + ioex.toString()); } - outLog.println("UNIT TEST 1: passed\n"); - - outLog.println("UNIT TEST 2: getCommandObject(DataHandler, ClassLoader) no java.beans.Beans"); - /* * Check that CommandInfo.getCommandObject can create a * command object even in an environment without @@ -91,8 +91,6 @@ public Status run(String argv[], PrintWriter outLog, PrintWriter outConsole) if (!fcl.getFiltered()) return Status.failed("getCommandObject() failed to filter"); - - outLog.println("UNIT TEST 2: passed\n"); return Status.passed("getCommandObject() Test succeeded"); } diff --git a/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandMap/createDataContentHandler_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandMap/createDataContentHandler_Test.java new file mode 100644 index 0000000..c9e75e4 --- /dev/null +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandMap/createDataContentHandler_Test.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package javasoft.sqe.tests.api.jakarta.activation.CommandMap; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.CommandMap; +import jakarta.activation.DataContentHandler; +import jakarta.activation.MailcapCommandMap; + +/** CommandMap is an abstract class. The main functional testing is in the only + * provided concrete implementation, MailcapCommandMap, done separately.

+ * We get default CommandMap objedct then using it call createDataContentHandler() + * api with string parameter. If this call returns a non-null DataContentHandler + * object then this testcase passes otherwise it fails. + */ + +public class createDataContentHandler_Test +{ + @Disabled("createDataContentHandler_Test was disabled in ts.jtx") + @Test + public void disabled() + { + Status s = run(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); + } + + public Status run() + { + // does getDefaultCommandMap return a MailcapCommandMap ? + CommandMap lCommandMap = CommandMap.getDefaultCommandMap(); + + if (!(lCommandMap instanceof MailcapCommandMap)) + return Status.failed("getDefaultCommandMap() did not return MailcapCommandMap"); + + DataContentHandler dch = lCommandMap.createDataContentHandler("text/plain"); //API TEST + + if( dch == null ) + return Status.failed("createDataContentHandler failed to return DataContentHandler object!"); + + return Status.passed("createDataContentHandler() Test succeeded"); + } +} diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandMap/getAllCommands_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandMap/getAllCommands_Test.java similarity index 73% rename from tests/api/javasoft/sqe/tests/jakarta/activation/CommandMap/getAllCommands_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandMap/getAllCommands_Test.java index 7920f5f..be95bce 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandMap/getAllCommands_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandMap/getAllCommands_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,15 @@ package javasoft.sqe.tests.api.jakarta.activation.CommandMap; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.CommandInfo; +import jakarta.activation.CommandMap; +import jakarta.activation.MailcapCommandMap; /** CommandMap is an abstract class. The main functional testing is in the only * provided concrete implementation, MailcapCommandMap, done separately.

@@ -28,16 +33,16 @@ * array object then this testcase passes otherwise it fails. */ -public class getAllCommands_Test implements Test +public class getAllCommands_Test { - public static void main(String argv[]) - { - getAllCommands_Test lTest = new getAllCommands_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); - } - - public Status run(String argv[], PrintWriter outLog, PrintWriter outConsole) + @Test + public void run() + { + Status s = test(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); + } + + public Status test() { // does getDefaultCommandMap return a MailcapCommandMap? CommandMap lCommandMap = CommandMap.getDefaultCommandMap(); diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandMap/getCommand_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandMap/getCommand_Test.java similarity index 75% rename from tests/api/javasoft/sqe/tests/jakarta/activation/CommandMap/getCommand_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandMap/getCommand_Test.java index a0e843e..c477f13 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandMap/getCommand_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandMap/getCommand_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,15 @@ package javasoft.sqe.tests.api.jakarta.activation.CommandMap; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.CommandInfo; +import jakarta.activation.CommandMap; +import jakarta.activation.MailcapCommandMap; /** CommandMap is an abstract class. The main functional testing is in the only * provided concrete implementation, MailcapCommandMap, done separately.

@@ -27,16 +32,16 @@ * of type CommandInfo then this testcase passes, otherwise it fails. */ -public class getCommand_Test implements Test +public class getCommand_Test { - public static void main(String argv[]) - { - getCommand_Test lTest = new getCommand_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); - } + @Test + public void run() + { + Status s = test(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); + } - public Status run(String argv[], PrintWriter outLog, PrintWriter outConsole) + public Status test() { // We are not going to require any 'default' viewer objects, // We will explicitly create a commandmap with one. diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandMap/getDefaultCommandMap_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandMap/getDefaultCommandMap_Test.java similarity index 77% rename from tests/api/javasoft/sqe/tests/jakarta/activation/CommandMap/getDefaultCommandMap_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandMap/getDefaultCommandMap_Test.java index 4ef8d30..dec30dd 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandMap/getDefaultCommandMap_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandMap/getDefaultCommandMap_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,15 @@ package javasoft.sqe.tests.api.jakarta.activation.CommandMap; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.CommandMap; +import jakarta.activation.MailcapCommandMap; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandMap; /** CommandMap is an abstract class. The main functional testing is in the only * provided concrete implementation, MailcapCommandMap, done separately.

@@ -28,16 +33,16 @@ * testcase passes otherwise it fails. */ -public class getDefaultCommandMap_Test implements Test +public class getDefaultCommandMap_Test { - public static void main(String argv[]) - { - getDefaultCommandMap_Test lTest = new getDefaultCommandMap_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); - } + @Test + public void run() + { + Status s = test(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); + } - public Status run(String argv[], PrintWriter outLog, PrintWriter outConsole) + public Status test() { // does getDefaultCommandMap return a MailcapCommandMap? CommandMap lCommandMap = CommandMap.getDefaultCommandMap(); // API TEST diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandMap/getPreferredCommands_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandMap/getPreferredCommands_Test.java similarity index 73% rename from tests/api/javasoft/sqe/tests/jakarta/activation/CommandMap/getPreferredCommands_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandMap/getPreferredCommands_Test.java index 9ec6a17..fc4344e 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandMap/getPreferredCommands_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandMap/getPreferredCommands_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,15 @@ package javasoft.sqe.tests.api.jakarta.activation.CommandMap; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.CommandInfo; +import jakarta.activation.CommandMap; +import jakarta.activation.MailcapCommandMap; /** CommandMap is an abstract class. The main functional testing is in the only * provided concrete implementation, MailcapCommandMap, done separately.

@@ -28,16 +33,16 @@ * CommandInfo array object then this testcase passes otherwise it fails. */ -public class getPreferredCommands_Test implements Test +public class getPreferredCommands_Test { - public static void main(String argv[]) - { - getPreferredCommands_Test lTest = new getPreferredCommands_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); - } - - public Status run(String argv[], PrintWriter outLog, PrintWriter outConsole) + @Test + public void run() + { + Status s = test(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); + } + + public Status test() { // does getDefaultCommandMap return a MailcapCommandMap? CommandMap lCommandMap = CommandMap.getDefaultCommandMap(); diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandMap/setDefaultCommandMap_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandMap/setDefaultCommandMap_Test.java similarity index 77% rename from tests/api/javasoft/sqe/tests/jakarta/activation/CommandMap/setDefaultCommandMap_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandMap/setDefaultCommandMap_Test.java index ddc8f79..7df7a21 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandMap/setDefaultCommandMap_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/CommandMap/setDefaultCommandMap_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,15 @@ package javasoft.sqe.tests.api.jakarta.activation.CommandMap; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.CommandMap; +import jakarta.activation.MailcapCommandMap; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandMap; /** CommandMap is an abstract class. The main functional testing is in the only * provided concrete implementation, MailcapCommandMap, done separately.

@@ -28,16 +33,16 @@ * then this testcase passes otherwise it fails. */ -public class setDefaultCommandMap_Test implements Test +public class setDefaultCommandMap_Test { - public static void main(String argv[]) - { - setDefaultCommandMap_Test lTest = new setDefaultCommandMap_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); - } + @Test + public void run() + { + Status s = test(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); + } - public Status run(String argv[], PrintWriter outLog, PrintWriter outConsole) + public Status test() { // does getDefaultCommandMap return a MailcapCommandMap? CommandMap lCommandMap = CommandMap.getDefaultCommandMap(); diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/DataHandler_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/DataHandler_Test.java similarity index 85% rename from tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/DataHandler_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/DataHandler_Test.java index 3661cc1..20dd0c6 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/DataHandler_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/DataHandler_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,19 +16,30 @@ package javasoft.sqe.tests.api.jakarta.activation.DataHandler; -import java.io.*; -import java.net.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URL; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.DataHandler; +import jakarta.activation.DataSource; +import jakarta.activation.FileDataSource; +import jakarta.activation.URLDataSource; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandObject; /** * Invoke all constructors to create DataHandler objects. If these operations * are successfull then this testcase passes otherwise it fails. */ -public class DataHandler_Test extends MultiTest +public class DataHandler_Test { private static final String kFileName = "foo.txt"; @@ -39,13 +50,12 @@ public class DataHandler_Test extends MultiTest private DataHandler objdh = null; // a DataHandler created from an Object/mimeType private DataSource objds = null; // DataSource returned from getDataSource for the Object case -public static void main(String argv[]) +@Test +public void testDataHandlerTest1() { - DataHandler_Test lTest = new DataHandler_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = dataHandlerTest1(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } - /** * dataHandlerTest1: a contructor test for DataHandler(DataSource); * @@ -72,6 +82,14 @@ public Status dataHandlerTest1() return Status.passed("DataHandler(DataSource) test succeeded"); } + +@Test +public void testDataHandlerTest2() +{ + Status s = dataHandlerTest2(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + /** * dataHandlerTest2: test a contructor DataHandler(String, String); * @@ -126,6 +144,14 @@ public Status dataHandlerTest2() return Status.passed("DataHandler(Object, String) test succeeded"); } + +@Test +public void testDataHandlerTest3() +{ + Status s = dataHandlerTest3(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + /** * dataHandlerTest3: attempt to construct a DataSource that cannot provide an output stream * test for appropriate exception from DataHandler.getOutputStream @@ -166,6 +192,14 @@ public Status dataHandlerTest3() } return Status.passed("DataHandler(DataSource) test succeeded"); } + +@Test +public void testDataHandlerTest4() throws IOException +{ + Status s = dataHandlerTest4(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + /** * dataHandlerTest4: attempt to constrcut a DataSource that cannot provide an input stream * test for appropriate exception from DataHandler.getInputStream, writeTo (which copies @@ -220,6 +254,14 @@ public Status dataHandlerTest4() throws IOException } return Status.passed("DataHandler(DataSource) test succeeded"); } + +@Test +public void testDataHandlerTest5() throws IOException +{ + Status s = dataHandlerTest5(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + /** * dataHandlerTest5: Test the DataHandler(URL) constructor. This is just a convenience for * DataHandler(new URLDataSource(URL)). Since DataHandler's correct use of DataSource diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getAllCommands_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getAllCommands_Test.java similarity index 76% rename from tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getAllCommands_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getAllCommands_Test.java index 2fb1f2f..96e955d 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getAllCommands_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getAllCommands_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,29 +16,30 @@ package javasoft.sqe.tests.api.jakarta.activation.DataHandler; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.CommandInfo; +import jakarta.activation.CommandMap; +import jakarta.activation.DataHandler; +import jakarta.activation.FileDataSource; +import jakarta.activation.MailcapCommandMap; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandMap; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandObject; /** Create a DataHandler object then use it to invoke getAllCommands() api, * if returns non-null array object containing all commands for the type * of data represented in the DataHandler, then this testcase passes. */ -public class getAllCommands_Test extends MultiTest +public class getAllCommands_Test { private static final String kFileName = "foo.txt"; private String message = null; -public static void main(String argv[]) -{ - getAllCommands_Test lTest = new getAllCommands_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); -} - private boolean checkCmdInfo(CommandInfo cmdInfo, String verb, String className) { if (cmdInfo == null) { @@ -55,6 +56,14 @@ private boolean checkCmdInfo(CommandInfo cmdInfo, String verb, String className) } return true; } + +@Test +public void testGetAllCommandsTest1() +{ + Status s = getAllCommandsTest1(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + /* * getAllCommandsTest1: Test for getAllCommands() method. */ @@ -79,6 +88,14 @@ public Status getAllCommandsTest1() return Status.passed("getAllCommands() test succeeded"); } + +@Test +public void testGetAllCommandsTest2() +{ + Status s = getAllCommandsTest2(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + /* * getAllCommandsTest2: Another Test for getAllCommands() method. */ diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getBean_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getBean_Test.java similarity index 75% rename from tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getBean_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getBean_Test.java index d7227e8..3c173a2 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getBean_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getBean_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,26 +16,30 @@ package javasoft.sqe.tests.api.jakarta.activation.DataHandler; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.CommandInfo; +import jakarta.activation.DataHandler; /** Create a DataHandler object then use it to invoke getBean() api, * if it returns a non-null Object then this testcase passes, * otherwise it fails. */ -public class getBean_Test implements Test +public class getBean_Test { - public static void main(String argv[]) - { - getBean_Test lTest = new getBean_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); - } + @Test + public void run() + { + Status s = test(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); + } - public Status run(String argv[], PrintWriter outLog, PrintWriter outConsole) + public Status test() { String verb = "view"; String className = "javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandObject"; diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getCommand_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getCommand_Test.java similarity index 84% rename from tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getCommand_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getCommand_Test.java index 7918556..94c1a69 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getCommand_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getCommand_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,29 +16,30 @@ package javasoft.sqe.tests.api.jakarta.activation.DataHandler; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.CommandInfo; +import jakarta.activation.CommandMap; +import jakarta.activation.DataHandler; +import jakarta.activation.FileDataSource; +import jakarta.activation.MailcapCommandMap; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandMap; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandObject; /** Create a DataHandler object then use it to invoke getCommand() api, * if this call returns a CommandInfo for specified command name, then * this testcase passes, otherwise it fails. */ -public class getCommand_Test extends MultiTest +public class getCommand_Test { private static final String kFileName = "foo.txt"; private String message = null; -public static void main(String argv[]) -{ - getCommand_Test lTest = new getCommand_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); -} - private boolean checkCmdInfo(CommandInfo cmdInfo, String verb, String className) { if (cmdInfo == null) { @@ -56,6 +57,13 @@ private boolean checkCmdInfo(CommandInfo cmdInfo, String verb, String className) return true; } +@Test +public void testGetCommandTest1() +{ + Status s = getCommandTest1(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + /** * getCommandTest1: Test the behavior of the CommandMap wrapper calls when using the default * command map. We need to have a know mapping to validate, so first, we install a default @@ -104,6 +112,14 @@ public Status getCommandTest1() return Status.passed("getCommand(String) test succeeded"); } + +@Test +public void testGetCommandTest2() +{ + Status s = getCommandTest2(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + /** * getCommandTest2: Test the behavior of the CommandMap wrapper calls when using a custom * CommandMap. For variation from the defaultCommandMapTest above, we'll use diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getContentType_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getContentType_Test.java similarity index 81% rename from tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getContentType_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getContentType_Test.java index ebaa155..b63b10d 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getContentType_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getContentType_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,15 @@ package javasoft.sqe.tests.api.jakarta.activation.DataHandler; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.DataHandler; +import jakarta.activation.DataSource; +import jakarta.activation.FileDataSource; /** * Create DataHandler objects with mimetype string, then use it to call @@ -27,7 +32,7 @@ * this testcase passes otherwise it fails. */ -public class getContentType_Test extends MultiTest +public class getContentType_Test { private static final String kFileName = "foo.txt"; @@ -39,11 +44,11 @@ public class getContentType_Test extends MultiTest private DataHandler objdh = null; // a DataHandler created from an Object/mimeType private DataSource objds = null; // DataSource returned from getDataSource for the Object case -public static void main(String argv[]) +@Test +public void testGetContentTypeTest1() { - getContentType_Test lTest = new getContentType_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getContentTypeTest1(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status getContentTypeTest1() @@ -58,6 +63,13 @@ public Status getContentTypeTest1() return Status.passed("getContentType() test succeeded"); } +@Test +public void testGetContentTypeTest2() +{ + Status s = getContentTypeTest2(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status getContentTypeTest2() { obj = new Object(); // just a random object diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getContent_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getContent_Test.java similarity index 71% rename from tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getContent_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getContent_Test.java index 59d1241..80fcff9 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getContent_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getContent_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,26 +16,30 @@ package javasoft.sqe.tests.api.jakarta.activation.DataHandler; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.DataHandler; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandObject; /** * Create a DataHandler object then use it to call getContent() api, * if this method returns non-null Object then this testcase passes. */ -public class getContent_Test implements Test +public class getContent_Test { - public static void main(String argv[]) - { - getContent_Test lTest = new getContent_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); - } - - public Status run(String argv[], PrintWriter outLog, PrintWriter outConsole) + @Test + public void run() + { + Status s = test(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); + } + + public Status test() { try { // create a DataHandler object diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getDataSource_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getDataSource_Test.java similarity index 78% rename from tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getDataSource_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getDataSource_Test.java index e4fc42a..7982d39 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getDataSource_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getDataSource_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,11 +16,19 @@ package javasoft.sqe.tests.api.jakarta.activation.DataHandler; -import java.io.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; import java.net.URL; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.DataHandler; +import jakarta.activation.DataSource; +import jakarta.activation.FileDataSource; +import jakarta.activation.URLDataSource; /** * Create a DataHandler object pass it various types of strings then @@ -28,7 +36,7 @@ * successfully returns DataSource objects then this testcase passes. */ -public class getDataSource_Test extends MultiTest +public class getDataSource_Test { private static final String kFileName = "foo.txt"; @@ -40,11 +48,11 @@ public class getDataSource_Test extends MultiTest private DataHandler objdh = null; // a DataHandler created from an Object/mimeType private DataSource objds = null; // DataSource returned from getDataSource for the Object case -public static void main(String argv[]) +@Test +public void testGetDataSourceTest1() throws IOException { - getDataSource_Test lTest = new getDataSource_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getDataSourceTest1(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status getDataSourceTest1() throws IOException @@ -62,6 +70,13 @@ public Status getDataSourceTest1() throws IOException return Status.passed("getDataSource() test succeeded"); } +@Test +public void testGetDataSourceTest2() throws IOException +{ + Status s = getDataSourceTest2(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status getDataSourceTest2() throws IOException { obj = new Object(); // just a random object @@ -85,6 +100,13 @@ public Status getDataSourceTest2() throws IOException return Status.passed("getDataSource() test succeeded"); } +@Test +public void testGetDataSourceTest3() throws IOException +{ + Status s = getDataSourceTest3(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status getDataSourceTest3() { String fileURLSpec = "file:test.txt"; diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getInputStream_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getInputStream_Test.java similarity index 89% rename from tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getInputStream_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getInputStream_Test.java index 8b7c086..6ff8486 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getInputStream_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getInputStream_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,11 +16,18 @@ package javasoft.sqe.tests.api.jakarta.activation.DataHandler; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; +import java.io.InputStream; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.DataHandler; +import jakarta.activation.DataSource; +import jakarta.activation.FileDataSource; import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestDataSource; /** @@ -29,7 +36,7 @@ * if this is successfull then this testcase passes otherwise it fails. */ -public class getInputStream_Test extends MultiTest +public class getInputStream_Test { private static final String kFileName = "foo.txt"; @@ -43,11 +50,11 @@ public class getInputStream_Test extends MultiTest private byte bytes[] = {0,1,2,3,4,5,6,7,8,9}; -public static void main(String argv[]) +@Test +public void testGetInputStreamTest() { - getInputStream_Test lTest = new getInputStream_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getInputStreamTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status getInputStreamTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getName_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getName_Test.java similarity index 83% rename from tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getName_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getName_Test.java index e78d11d..1257088 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getName_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getName_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,17 +16,22 @@ package javasoft.sqe.tests.api.jakarta.activation.DataHandler; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.DataHandler; +import jakarta.activation.DataSource; +import jakarta.activation.FileDataSource; /** * Create DataHandler object and then call getName() api, if this operation * returns the expected non-null string then this testcase passes. */ -public class getName_Test extends MultiTest +public class getName_Test { private static final String kFileName = "foo.txt"; @@ -38,11 +43,11 @@ public class getName_Test extends MultiTest private DataHandler objdh = null; // a DataHandler created from an Object/mimeType private DataSource objds = null; // DataSource returned from getDataSource for the Object case -public static void main(String argv[]) +@Test +public void testGetNameTest() { - getName_Test lTest = new getName_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getNameTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status getNameTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getOutputStream_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getOutputStream_Test.java similarity index 88% rename from tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getOutputStream_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getOutputStream_Test.java index 36778a4..e066b33 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getOutputStream_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getOutputStream_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,18 @@ package javasoft.sqe.tests.api.jakarta.activation.DataHandler; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.InputStream; +import java.io.OutputStream; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.DataHandler; +import jakarta.activation.DataSource; +import jakarta.activation.FileDataSource; /** * Create DataHandler objects with various type input file strings then use @@ -27,7 +35,7 @@ * if this is successfull then this testcase passes otherwise it fails. */ -public class getOutputStream_Test extends MultiTest +public class getOutputStream_Test { private static final String kFileName = "foo.txt"; @@ -39,11 +47,11 @@ public class getOutputStream_Test extends MultiTest private DataHandler objdh = null; // a DataHandler created from an Object/mimeType private DataSource objds = null; // DataSource returned from getDataSource for the Object case -public static void main(String argv[]) +@Test +public void testGetOutputStreamTest() { - getOutputStream_Test lTest = new getOutputStream_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getOutputStreamTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status getOutputStreamTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getPreferredCommands_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getPreferredCommands_Test.java similarity index 88% rename from tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getPreferredCommands_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getPreferredCommands_Test.java index 57c4659..6987566 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getPreferredCommands_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getPreferredCommands_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,27 +16,35 @@ package javasoft.sqe.tests.api.jakarta.activation.DataHandler; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.CommandInfo; +import jakarta.activation.CommandMap; +import jakarta.activation.DataHandler; +import jakarta.activation.FileDataSource; +import jakarta.activation.MailcapCommandMap; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandMap; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandObject; /** Using instances of DataHandler we invoke getPreferredCommands() api, if this * method returns a non-null array object of type CommandInfo, of size greater * then zero then this testcase passes otherwise it fails. */ -public class getPreferredCommands_Test extends MultiTest +public class getPreferredCommands_Test { private static final String kFileName = "foo.txt"; private String message = null; -public static void main(String argv[]) +@Test +public void testGetPreferredCommandsTest() { - getPreferredCommands_Test lTest = new getPreferredCommands_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getPreferredCommandsTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } private boolean checkCmdInfo(CommandInfo cmdInfo, String verb, String className) diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getTransferDataFlavors_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getTransferDataFlavors_Test.java similarity index 82% rename from tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getTransferDataFlavors_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getTransferDataFlavors_Test.java index 9589d81..e8b9dc9 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getTransferDataFlavors_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getTransferDataFlavors_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,11 +16,20 @@ package javasoft.sqe.tests.api.jakarta.activation.DataHandler; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.ActivationDataFlavor; +import jakarta.activation.DataHandler; +import jakarta.activation.DataSource; +import jakarta.activation.FileDataSource; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandMap; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandObject; /** * Use an instance of type DataHandler to invoke getTransferDataFlavors() api, @@ -28,16 +37,16 @@ * this testcase passes otherwise it fails. */ -public class getTransferDataFlavors_Test extends MultiTest +public class getTransferDataFlavors_Test { private static final String kFileName = "foo.txt"; private String message = null; -public static void main(String argv[]) +@Test +public void testGetTransferDataFlavorsTest1() throws IOException { - getTransferDataFlavors_Test lTest = new getTransferDataFlavors_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getTransferDataFlavorsTest1(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status getTransferDataFlavorsTest1() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getTransferData_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getTransferData_Test.java similarity index 85% rename from tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getTransferData_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getTransferData_Test.java index 0a95e9d..3ef362a 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/getTransferData_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/getTransferData_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,11 +16,21 @@ package javasoft.sqe.tests.api.jakarta.activation.DataHandler; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.ActivationDataFlavor; +import jakarta.activation.DataHandler; +import jakarta.activation.DataSource; +import jakarta.activation.FileDataSource; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandMap; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandObject; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestDCH; /** * Create DataHandler instances, use them to invoke getTransferData() api, if @@ -28,17 +38,16 @@ * then this testcase passes, otherwise it fails. */ -public class getTransferData_Test extends MultiTest +public class getTransferData_Test { private static final String kFileName = "foo.txt"; -private Object obj = null; // Object for DataHandler(Object, String) private String message = null; -public static void main(String argv[]) +@Test +public void testGetTransferDataTest1() throws IOException { - getTransferData_Test lTest = new getTransferData_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getTransferDataTest1(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } /* diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/isDataFlavorSupported_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/isDataFlavorSupported_Test.java similarity index 75% rename from tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/isDataFlavorSupported_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/isDataFlavorSupported_Test.java index 7ea53fb..8fefcd6 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/isDataFlavorSupported_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/isDataFlavorSupported_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,11 +16,20 @@ package javasoft.sqe.tests.api.jakarta.activation.DataHandler; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.ActivationDataFlavor; +import jakarta.activation.DataHandler; +import jakarta.activation.DataSource; +import jakarta.activation.FileDataSource; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandMap; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandObject; /** * Using an instance of DataHandler object, invoke isDataFlavorSupported() @@ -28,15 +37,15 @@ * this testcase passes. */ -public class isDataFlavorSupported_Test extends MultiTest +public class isDataFlavorSupported_Test { private static final String kFileName = "foo.txt"; -public static void main(String argv[]) +@Test +public void testIsDataFlavorSupportedTest() throws IOException { - isDataFlavorSupported_Test lTest = new isDataFlavorSupported_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = isDataFlavorSupportedTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status isDataFlavorSupportedTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/setCommandMap_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/setCommandMap_Test.java similarity index 82% rename from tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/setCommandMap_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/setCommandMap_Test.java index 9dbbe06..d389763 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/setCommandMap_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/setCommandMap_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,11 +16,18 @@ package javasoft.sqe.tests.api.jakarta.activation.DataHandler; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.ActivationDataFlavor; +import jakarta.activation.CommandMap; +import jakarta.activation.DataHandler; +import jakarta.activation.FileDataSource; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandMap; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandObject; /** * Create instances of DataHandler, then use invoke setCommandMap() api, with @@ -28,16 +35,16 @@ * then this testcase passes, otherwise it fails. */ -public class setCommandMap_Test extends MultiTest +public class setCommandMap_Test { private static final String kFileName = "foo.txt"; private String message = null; -public static void main(String argv[]) +@Test +public void testSetCommandMapTest() { - setCommandMap_Test lTest = new setCommandMap_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = setCommandMapTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status setCommandMapTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/setDataContentHandlerFactory_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/setDataContentHandlerFactory_Test.java similarity index 78% rename from tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/setDataContentHandlerFactory_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/setDataContentHandlerFactory_Test.java index e97c6af..19e7598 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/setDataContentHandlerFactory_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/setDataContentHandlerFactory_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,11 +16,20 @@ package javasoft.sqe.tests.api.jakarta.activation.DataHandler; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.ActivationDataFlavor; +import jakarta.activation.DataContentHandlerFactory; +import jakarta.activation.DataHandler; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandMap; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandObject; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestDCHFactory; /** * Use an instance of DataHandler of invoke setDataContentHandlerFactory() api @@ -28,15 +37,15 @@ * this testcase passes, otherwise if an exception is thrown then it fails. */ -public class setDataContentHandlerFactory_Test extends MultiTest +public class setDataContentHandlerFactory_Test { private String message = null; -public static void main(String argv[]) +@Test +public void testSetDataContentHandlerFactoryTest() throws IOException { - setDataContentHandlerFactory_Test lTest = new setDataContentHandlerFactory_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = setDataContentHandlerFactoryTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } /* diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/setMapCommand_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/setMapCommand_Test.java similarity index 80% rename from tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/setMapCommand_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/setMapCommand_Test.java index 242d7db..2d6b498 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/setMapCommand_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/setMapCommand_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,11 +16,19 @@ package javasoft.sqe.tests.api.jakarta.activation.DataHandler; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.ActivationDataFlavor; +import jakarta.activation.DataHandler; +import jakarta.activation.FileDataSource; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandMap; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestCommandObject; /** * Create instances of DataHandler, then use invoke setMapCommand() api, with @@ -28,16 +36,16 @@ * then this testcase passes, otherwise it fails. */ -public class setMapCommand_Test extends MultiTest +public class setMapCommand_Test { private static final String kFileName = "foo.txt"; private String message = null; -public static void main(String argv[]) +@Test +public void testSetCommandMapTest() throws IOException { - setMapCommand_Test lTest = new setMapCommand_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = setCommandMapTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status setCommandMapTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/writeTo_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/writeTo_Test.java similarity index 83% rename from tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/writeTo_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/writeTo_Test.java index 2efb402..9401612 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/writeTo_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/DataHandler/writeTo_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,11 +16,21 @@ package javasoft.sqe.tests.api.jakarta.activation.DataHandler; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.OutputStream; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.DataHandler; +import jakarta.activation.DataSource; +import jakarta.activation.FileDataSource; +import jakarta.activation.UnsupportedDataTypeException; +import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestDataSource; /** * writeTo() api writes out to OutputStream for a given DataHandler object @@ -28,7 +38,7 @@ * testcase passes, it fails if it throws an exception. */ -public class writeTo_Test extends MultiTest +public class writeTo_Test { private static final String kFileName = "foo.txt"; @@ -40,11 +50,11 @@ public class writeTo_Test extends MultiTest private DataHandler objdh = null; // a DataHandler created from an Object/mimeType private DataSource objds = null; // DataSource returned from getDataSource for the Object case -public static void main(String argv[]) +@Test +public void testWriteToTest() throws IOException { - writeTo_Test lTest = new writeTo_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = writeToTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status writeToTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/FileDataSource_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileDataSource/FileDataSource_Test.java similarity index 74% rename from tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/FileDataSource_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileDataSource/FileDataSource_Test.java index 388fea4..a7023af 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/FileDataSource_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileDataSource/FileDataSource_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,31 +16,35 @@ package javasoft.sqe.tests.api.jakarta.activation.FileDataSource; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestFileTypeMap; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.FileDataSource; /** * Create an instance of type FileDataSource, if successfull * then this testcase passes, otherwise it fails. */ -public class FileDataSource_Test extends MultiTest +public class FileDataSource_Test { private static final String kFileName = "FDSTestFile.txt"; -public static void main(String argv[]) -{ - FileDataSource_Test lTest = new FileDataSource_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); -} - -public void init() +@Test +public void testFileDataSourceTest1() throws IOException { - + Status s = FileDataSourceTest1(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status FileDataSourceTest1() @@ -55,6 +59,13 @@ public Status FileDataSourceTest1() return Status.passed("FileDataSource() test passed"); } +@Test +public void testFileDataSourceTest2() throws IOException +{ + Status s = FileDataSourceTest2(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status FileDataSourceTest2() { InputStream is = null; @@ -72,6 +83,13 @@ public Status FileDataSourceTest2() return Status.failed("FileDataSource() no input test failed: getInputStream() didn't throw"); } +@Test +public void testFileDataSourceTest3() throws IOException +{ + Status s = FileDataSourceTest3(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status FileDataSourceTest3() throws IOException { File lFile = new File("bad/name"); diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/getContentType_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileDataSource/getContentType_Test.java similarity index 82% rename from tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/getContentType_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileDataSource/getContentType_Test.java index 73e3daa..cd6b0be 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/getContentType_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileDataSource/getContentType_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,18 @@ package javasoft.sqe.tests.api.jakarta.activation.FileDataSource; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.File; +import java.io.IOException; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.FileDataSource; +import jakarta.activation.FileTypeMap; +import jakarta.activation.MimetypesFileTypeMap; import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestFileTypeMap; /** @@ -28,15 +36,15 @@ * then this testcase passes, otherwise it fails. */ -public class getContentType_Test extends MultiTest +public class getContentType_Test { private static final String kFileName = "FDSTestFile.txt"; -public static void main(String argv[]) +@Test +public void testGetContentTypeTest() throws IOException { - getContentType_Test lTest = new getContentType_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getContentTypeTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status getContentTypeTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/getFile_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileDataSource/getFile_Test.java similarity index 73% rename from tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/getFile_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileDataSource/getFile_Test.java index 6b84311..e1db01a 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/getFile_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileDataSource/getFile_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,11 +16,15 @@ package javasoft.sqe.tests.api.jakarta.activation.FileDataSource; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestFileTypeMap; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.File; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.FileDataSource; /** * Create a FileDataSource instance and then use it to call getFile() api, @@ -28,15 +32,15 @@ * passes, otherwise it fails. */ -public class getFile_Test extends MultiTest +public class getFile_Test { private static final String kFileName = "FDSTestFile.txt"; -public static void main(String argv[]) +@Test +public void testGetFileTest() { - getFile_Test lTest = new getFile_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getFileTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status getFileTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/getInputStream_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileDataSource/getInputStream_Test.java similarity index 81% rename from tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/getInputStream_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileDataSource/getInputStream_Test.java index de7952f..2126e09 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/getInputStream_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileDataSource/getInputStream_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,11 +16,18 @@ package javasoft.sqe.tests.api.jakarta.activation.FileDataSource; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestFileTypeMap; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.InputStream; +import java.io.OutputStream; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.FileDataSource; /** * Create an instance of FileDataSource, use it to invoke getInputStream() @@ -28,17 +35,17 @@ * testcase passes, if it throws an appropriate exception then it fails. */ -public class getInputStream_Test extends MultiTest +public class getInputStream_Test { private static final String kFileName = "FDSTestFile.txt"; private String message; private String msgPrefix; -public static void main(String argv[]) +@Test +public void testGetInputStreamTest1() { - getInputStream_Test lTest = new getInputStream_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getInputStreamTest1(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status getInputStreamTest1() @@ -59,6 +66,13 @@ public Status getInputStreamTest1() return Status.passed("getInputStream() " + message); } +@Test +public void testGetInputStreamTest2() +{ + Status s = getInputStreamTest2(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status getInputStreamTest2() { InputStream is = null; diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/getName_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileDataSource/getName_Test.java similarity index 73% rename from tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/getName_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileDataSource/getName_Test.java index 4beffc5..a6a6273 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/getName_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileDataSource/getName_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,11 +16,15 @@ package javasoft.sqe.tests.api.jakarta.activation.FileDataSource; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestFileTypeMap; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.File; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.FileDataSource; /** * Create an instance of FileDataSource class and use it to call getName() @@ -28,15 +32,15 @@ * otherwise it fails. */ -public class getName_Test extends MultiTest +public class getName_Test { private static final String kFileName = "FDSTestFile.txt"; -public static void main(String argv[]) +@Test +public void testGetNameTest() { - getName_Test lTest = new getName_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getNameTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status getNameTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/getOutputStream_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileDataSource/getOutputStream_Test.java similarity index 81% rename from tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/getOutputStream_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileDataSource/getOutputStream_Test.java index 85ed179..212442b 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/getOutputStream_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileDataSource/getOutputStream_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,11 +16,19 @@ package javasoft.sqe.tests.api.jakarta.activation.FileDataSource; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestFileTypeMap; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.FileDataSource; /** * Create an instance of FileDataSource, use it to invoke getOutputStream() @@ -28,17 +36,17 @@ * testcase passes, if it throws an appropriate exception then it fails. */ -public class getOutputStream_Test extends MultiTest +public class getOutputStream_Test { private static final String kFileName = "FDSTestFile.txt"; private String message; private String msgPrefix; -public static void main(String argv[]) +@Test +public void testGetOutputStreamTest1() { - getOutputStream_Test lTest = new getOutputStream_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getOutputStreamTest1(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status getOutputStreamTest1() @@ -91,6 +99,13 @@ private boolean testIO(FileDataSource fds) return true; } +@Test +public void testGetOutputStreamTest2() throws IOException +{ + Status s = getOutputStreamTest2(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status getOutputStreamTest2() throws IOException { File lFile = new File("bad/name"); diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/setFileTypeMap_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileDataSource/setFileTypeMap_Test.java similarity index 82% rename from tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/setFileTypeMap_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileDataSource/setFileTypeMap_Test.java index b9d04a9..69d8a3c 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/setFileTypeMap_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileDataSource/setFileTypeMap_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,18 @@ package javasoft.sqe.tests.api.jakarta.activation.FileDataSource; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.File; +import java.io.IOException; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.FileDataSource; +import jakarta.activation.FileTypeMap; +import jakarta.activation.MimetypesFileTypeMap; import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestFileTypeMap; /** @@ -28,15 +36,15 @@ * the get values are the same then this testcsae passes, otherwise it fails. */ -public class setFileTypeMap_Test extends MultiTest +public class setFileTypeMap_Test { private static final String kFileName = "FDSTestFile.txt"; -public static void main(String argv[]) +@Test +public void testSetFileTypeMapTest() throws IOException { - setFileTypeMap_Test lTest = new setFileTypeMap_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = setFileTypeMapTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status setFileTypeMapTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/FileTypeMap/FileTypeMap_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileTypeMap/FileTypeMap_Test.java similarity index 72% rename from tests/api/javasoft/sqe/tests/jakarta/activation/FileTypeMap/FileTypeMap_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileTypeMap/FileTypeMap_Test.java index 2c0c2ad..fd1768b 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/FileTypeMap/FileTypeMap_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileTypeMap/FileTypeMap_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,15 @@ package javasoft.sqe.tests.api.jakarta.activation.FileTypeMap; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestFileTypeMap; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.FileTypeMap; // FileTypeMap is an abstract class. The main functional testing is in the only provided // concrete implementation, MimetypesFileTypeMap, tested separately. Here we just test @@ -32,17 +37,17 @@ * testcase passes, otherwise it fails. */ -public class FileTypeMap_Test implements Test +public class FileTypeMap_Test { -public static void main(String argv[]) -{ - FileTypeMap_Test lTest = new FileTypeMap_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); -} + @Test + public void test() throws IOException + { + Status s = run(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); + } -public Status run(String argv[], PrintWriter outLog, PrintWriter outConsole) +public Status run() { FileTypeMap ftm = FileTypeMap.getDefaultFileTypeMap(); // API TEST diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/FileTypeMap/getContentType_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileTypeMap/getContentType_Test.java similarity index 72% rename from tests/api/javasoft/sqe/tests/jakarta/activation/FileTypeMap/getContentType_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileTypeMap/getContentType_Test.java index 4a425ee..ddb1d3d 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/FileTypeMap/getContentType_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileTypeMap/getContentType_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,16 @@ package javasoft.sqe.tests.api.jakarta.activation.FileTypeMap; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestFileTypeMap; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.File; +import java.io.IOException; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.FileTypeMap; /** FileTypeMap is an abstract class. The main functional testing is in the only provided * concrete implementation, MimetypesFileTypeMap, tested separately.

@@ -28,17 +34,17 @@ * string object then this testcase passes, otherwise it fails. */ -public class getContentType_Test implements Test +public class getContentType_Test { -public static void main(String argv[]) -{ - getContentType_Test lTest = new getContentType_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); -} + @Test + public void test() throws IOException + { + Status s = run(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); + } -public Status run(String argv[], PrintWriter outLog, PrintWriter outConsole) +public Status run() { File fob = new File("testfile.txt"); FileTypeMap ftm = FileTypeMap.getDefaultFileTypeMap(); diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/FileTypeMap/getDefaultFileTypeMap_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileTypeMap/getDefaultFileTypeMap_Test.java similarity index 82% rename from tests/api/javasoft/sqe/tests/jakarta/activation/FileTypeMap/getDefaultFileTypeMap_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileTypeMap/getDefaultFileTypeMap_Test.java index de3af39..049dfcd 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/FileTypeMap/getDefaultFileTypeMap_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileTypeMap/getDefaultFileTypeMap_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,9 +16,15 @@ package javasoft.sqe.tests.api.jakarta.activation.FileTypeMap; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.FileTypeMap; import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestFileTypeMap; /** FileTypeMap is an abstract class. The main functional testing is in the only provided @@ -28,17 +34,17 @@ * then this testcase passes, otherwise it fails. */ -public class getDefaultFileTypeMap_Test implements Test +public class getDefaultFileTypeMap_Test { -public static void main(String argv[]) -{ - getDefaultFileTypeMap_Test lTest = new getDefaultFileTypeMap_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); -} + @Test + public void test() throws IOException + { + Status s = run(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); + } -public Status run(String argv[], PrintWriter outLog, PrintWriter outConsole) +public Status run() { // does getDefaultFileTypeMap return a MimetypesFileTypeMap? FileTypeMap systemTypeMap = FileTypeMap.getDefaultFileTypeMap(); // API TEST diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/FileTypeMap/setDefaultFileTypeMap_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileTypeMap/setDefaultFileTypeMap_Test.java similarity index 82% rename from tests/api/javasoft/sqe/tests/jakarta/activation/FileTypeMap/setDefaultFileTypeMap_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileTypeMap/setDefaultFileTypeMap_Test.java index 495702f..b4e5a81 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/FileTypeMap/setDefaultFileTypeMap_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/FileTypeMap/setDefaultFileTypeMap_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,9 +16,15 @@ package javasoft.sqe.tests.api.jakarta.activation.FileTypeMap; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.FileTypeMap; import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestFileTypeMap; /** FileTypeMap is an abstract class. The main functional testing is in the only provided @@ -28,17 +34,17 @@ * set/get values are the same then this testcase passes, otherwise it fails. */ -public class setDefaultFileTypeMap_Test implements Test +public class setDefaultFileTypeMap_Test { -public static void main(String argv[]) -{ - setDefaultFileTypeMap_Test lTest = new setDefaultFileTypeMap_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); -} + @Test + public void test() throws IOException + { + Status s = run(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); + } -public Status run(String argv[], PrintWriter outLog, PrintWriter outConsole) +public Status run() { // does getDefaultFileTypeMap return a MimetypesFileTypeMap? FileTypeMap systemTypeMap = FileTypeMap.getDefaultFileTypeMap(); diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/MailcapCommandMap_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/MailcapCommandMap_Test.java similarity index 75% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/MailcapCommandMap_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/MailcapCommandMap_Test.java index 572f08d..589b762 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/MailcapCommandMap_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/MailcapCommandMap_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,20 +16,28 @@ package javasoft.sqe.tests.api.jakarta.activation.MailcapCommandMap; -import java.beans.*; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; import java.nio.charset.StandardCharsets; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestDCH; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MailcapCommandMap; /** Test: MailcapCommandMap() ; default constructor.

Test: MailcapCommandMap(String) ; allows the caller to specify the path of a mailcap file.

Test: MailcapCommandMap(InputStream) ; allows the caller to specify an InputStream containing a mailcap file. */ -public class MailcapCommandMap_Test extends MultiTest +public class MailcapCommandMap_Test { private static String testMailcap[] = { @@ -42,11 +50,11 @@ public class MailcapCommandMap_Test extends MultiTest private File testMcapFile = null; private String message; -public static void main(String argv[]) +@Test +public void testMailcapCommandMapTest1() throws IOException { - MailcapCommandMap_Test lTest = new MailcapCommandMap_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = mailcapCommandMapTest1(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } private void setupFile() throws IOException @@ -79,6 +87,13 @@ public Status mailcapCommandMapTest1() return Status.passed(message); } +@Test +public void testMailcapCommandMapTest2() throws IOException +{ + Status s = mailcapCommandMapTest2(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status mailcapCommandMapTest2() throws IOException { message = "MailcapCommandMap(fileName) test succeeded"; @@ -92,6 +107,13 @@ public Status mailcapCommandMapTest2() throws IOException return Status.passed(message); } +@Test +public void testMailcapCommandMapTest3() throws IOException +{ + Status s = mailcapCommandMapTest3(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status mailcapCommandMapTest3() throws FileNotFoundException, IOException { boolean lPassed = true; @@ -109,6 +131,13 @@ public Status mailcapCommandMapTest3() throws FileNotFoundException, IOException return Status.passed(message); } +@Test +public void testMailcapCommandMapTest4() throws IOException +{ + Status s = mailcapCommandMapTest4(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status mailcapCommandMapTest4() { try { diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/addMailcap_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/addMailcap_Test.java similarity index 90% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/addMailcap_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/addMailcap_Test.java index b24e631..969372a 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/addMailcap_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/addMailcap_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,17 @@ package javasoft.sqe.tests.api.jakarta.activation.MailcapCommandMap; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.CommandInfo; +import jakarta.activation.DataContentHandler; +import jakarta.activation.MailcapCommandMap; /** * Create a MailcapCommandMap instance, use it to call addMailcap() method with @@ -30,7 +37,7 @@ * should be in mailcap format. */ -public class addMailcap_Test extends MultiTest +public class addMailcap_Test { private static String testMailcap[] = { "text/*;; x-java-view=rom.pun.activation.viewers.FooViewer", @@ -41,11 +48,11 @@ public class addMailcap_Test extends MultiTest private MailcapCommandMap commandMap = null; private String message; -public static void main(String argv[]) +@Test +public void testAddMailcapTest() throws IOException { - addMailcap_Test lTest = new addMailcap_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = addMailcapTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status addMailcapTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/createDataContentHandler_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/createDataContentHandler_Test.java similarity index 87% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/createDataContentHandler_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/createDataContentHandler_Test.java index e52a046..0517eb5 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/createDataContentHandler_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/createDataContentHandler_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,12 +16,16 @@ package javasoft.sqe.tests.api.jakarta.activation.MailcapCommandMap; -import java.beans.*; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestDCH; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.DataContentHandler; +import jakarta.activation.MailcapCommandMap; /** * Create a MailcapCommandMap instance, use it to call createDataContentHandler() @@ -29,7 +33,7 @@ * of type DataContentHandler, then this test passes otherwise it fails. */ -public class createDataContentHandler_Test extends MultiTest +public class createDataContentHandler_Test { private static String testMailcap[] = { "text/*;; x-java-view=rom.pun.activation.viewers.FooViewer", @@ -40,11 +44,11 @@ public class createDataContentHandler_Test extends MultiTest private MailcapCommandMap commandMap = null; private String message; -public static void main(String argv[]) +@Test +public void run() throws IOException { - createDataContentHandler_Test lTest = new createDataContentHandler_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = createDataContentHandlerTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } private boolean runTest(String mimeType, String verb, String className, String dchClassName) diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/getAllCommands_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/getAllCommands_Test.java similarity index 87% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/getAllCommands_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/getAllCommands_Test.java index 7a4e1e4..aa5c18d 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/getAllCommands_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/getAllCommands_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,12 +16,16 @@ package javasoft.sqe.tests.api.jakarta.activation.MailcapCommandMap; -import java.beans.*; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestDCH; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.CommandInfo; +import jakarta.activation.MailcapCommandMap; /** * Create a MailcapCommandMap instance, use it to call getAllCommands() @@ -29,7 +33,7 @@ * CommandInfo then this test passes otherwise it fails. */ -public class getAllCommands_Test extends MultiTest +public class getAllCommands_Test { private static String testMailcap[] = { "text/*;; x-java-view=rom.pun.activation.viewers.FooViewer", @@ -40,11 +44,11 @@ public class getAllCommands_Test extends MultiTest private MailcapCommandMap commandMap = null; private String message; -public static void main(String argv[]) +@Test +public void run() throws IOException { - getAllCommands_Test lTest = new getAllCommands_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getAllCommandsTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status getAllCommandsTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/getCommand_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/getCommand_Test.java similarity index 88% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/getCommand_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/getCommand_Test.java index b006a11..f89333c 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/getCommand_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/getCommand_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,12 +16,16 @@ package javasoft.sqe.tests.api.jakarta.activation.MailcapCommandMap; -import java.beans.*; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestDCH; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.CommandInfo; +import jakarta.activation.MailcapCommandMap; /** * Create a MailcapCommandMap instance, use it to call getCommand() @@ -29,7 +33,7 @@ * CommandInfo then this test passes otherwise it fails. */ -public class getCommand_Test extends MultiTest +public class getCommand_Test { private static String testMailcap[] = { "text/*;; x-java-view=rom.pun.activation.viewers.FooViewer", @@ -40,11 +44,11 @@ public class getCommand_Test extends MultiTest private MailcapCommandMap commandMap = null; private String message; -public static void main(String argv[]) +@Test +public void run() throws IOException { - getCommand_Test lTest = new getCommand_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getCommandTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status getCommandTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/getPreferredCommands_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/getPreferredCommands_Test.java similarity index 87% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/getPreferredCommands_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/getPreferredCommands_Test.java index 1f4324d..765ed81 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/getPreferredCommands_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/getPreferredCommands_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,12 +16,16 @@ package javasoft.sqe.tests.api.jakarta.activation.MailcapCommandMap; -import java.beans.*; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.TestDCH; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.CommandInfo; +import jakarta.activation.MailcapCommandMap; /** * Create a MailcapCommandMap instance, use it to call getPreferredCommands() @@ -29,7 +33,7 @@ * object of type CommandInfo then this test passes otherwise it fails. */ -public class getPreferredCommands_Test extends MultiTest +public class getPreferredCommands_Test { private static String testMailcap[] = { "text/*;; x-java-view=rom.pun.activation.viewers.FooViewer", @@ -40,11 +44,11 @@ public class getPreferredCommands_Test extends MultiTest private MailcapCommandMap commandMap = null; private String message; -public static void main(String argv[]) +@Test +public void run() throws IOException { - getPreferredCommands_Test lTest = new getPreferredCommands_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getPreferredCommandsTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status getPreferredCommandsTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/loadFromConf_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/loadFromConf_Test.java similarity index 83% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/loadFromConf_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/loadFromConf_Test.java index e773fc3..d953233 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/loadFromConf_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/loadFromConf_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,12 +16,19 @@ package javasoft.sqe.tests.api.jakarta.activation.MailcapCommandMap; -import java.util.*; -import java.io.*; -import jakarta.activation.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; import java.nio.file.Files; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MailcapCommandMap; /** * This class tests that resource files are loaded as expected.

@@ -30,7 +37,7 @@ * how2test: Create a MailcapCommandMap */ -public class loadFromConf_Test extends MultiTest { +public class loadFromConf_Test { private boolean skip = false; @@ -38,11 +45,11 @@ public class loadFromConf_Test extends MultiTest { private static final String entry1 = mimeType + ";test1"; private static final String entry2 = mimeType + ";test2"; - public static void main( String argv[] ) + @Test + public void run() { - loadFromConf_Test test = new loadFromConf_Test(); - Status s = test.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - s.exit(); + Status s = test(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } /** @@ -50,7 +57,8 @@ public static void main( String argv[] ) * create a fake java.home and point the System property * to it. */ - public void init() throws SetupException + @BeforeEach + public void init() { try { File home = File.createTempFile("javahome", "conf"); @@ -94,11 +102,11 @@ public void init() throws SetupException pw.println(entry2); pw.close(); } catch (IOException ioex) { - throw new SetupException(ioex.toString()); + throw new IllegalStateException(ioex.toString()); } } - public Status loadFromConfTest() + public Status test() { if (skip) return Status.passed("loadFromConf skipped"); diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/loadFromLib_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/loadFromLib_Test.java similarity index 82% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/loadFromLib_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/loadFromLib_Test.java index 1ce5298..f4e47af 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/loadFromLib_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MailcapCommandMap/loadFromLib_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,12 +16,19 @@ package javasoft.sqe.tests.api.jakarta.activation.MailcapCommandMap; -import java.util.*; -import java.io.*; -import jakarta.activation.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; import java.nio.file.Files; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MailcapCommandMap; /** * This class tests that resource files are loaded as expected.

@@ -30,18 +37,18 @@ * how2test: Create a MailcapCommandMap */ -public class loadFromLib_Test extends MultiTest { +public class loadFromLib_Test { private boolean skip = false; private static final String mimeType = "application/x-test"; private static final String entry = mimeType + ";test1"; - public static void main( String argv[] ) + @Test + public void run() { - loadFromLib_Test test = new loadFromLib_Test(); - Status s = test.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - s.exit(); + Status s = loadFromLibTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } /** @@ -49,7 +56,8 @@ public static void main( String argv[] ) * create a fake java.home and point the System property * to it. */ - public void init() throws SetupException + @BeforeEach + public void init() { try { File home = File.createTempFile("javahome", "conf"); @@ -82,7 +90,7 @@ public void init() throws SetupException pw.println(entry); pw.close(); } catch (IOException ioex) { - throw new SetupException(ioex.toString()); + throw new IllegalStateException(ioex.toString()); } } diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/MimeType_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/MimeType_Test.java similarity index 78% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/MimeType_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/MimeType_Test.java index cf8bfd2..bf6a3a0 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/MimeType_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/MimeType_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeType; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeType; /** * Create MimeType instances, using various constructors, if these @@ -27,14 +30,14 @@ * it fails. */ -public class MimeType_Test extends MultiTest +public class MimeType_Test { -public static void main(String argv[]) +@Test +public void testMimeTypeTest1() { - MimeType_Test lTest = new MimeType_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = mimeTypeTest1(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status mimeTypeTest1() @@ -60,6 +63,13 @@ public Status mimeTypeTest1() return Status.passed("MimeType(void | String) test succeeded"); } +@Test +public void testMimeTypeTest2() +{ + Status s = mimeTypeTest2(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status mimeTypeTest2() { try { diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/getBaseType_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/getBaseType_Test.java similarity index 75% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/getBaseType_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/getBaseType_Test.java index 78698b3..89d1737 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/getBaseType_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/getBaseType_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,15 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeType; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeType; /** * Create a MimeType instance, use it to call getBaseType() method, if @@ -27,15 +32,15 @@ * passes, otherwise it fails. */ -public class getBaseType_Test extends MultiTest +public class getBaseType_Test { -public static void main(String argv[]) -{ - getBaseType_Test lTest = new getBaseType_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); -} + @Test + public void run() throws IOException + { + Status s = getBaseTypeTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); + } public Status getBaseTypeTest() { diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/getParameter_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/getParameter_Test.java similarity index 77% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/getParameter_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/getParameter_Test.java index d9bfe85..130203f 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/getParameter_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/getParameter_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,15 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeType; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeType; /** * Create a MimeType instance, use it to call getParameter() method with a given @@ -27,14 +32,14 @@ * this test passes, otherwise it fails. */ -public class getParameter_Test extends MultiTest +public class getParameter_Test { -public static void main(String argv[]) +@Test +public void testGetParameterTest1() throws IOException { - getParameter_Test lTest = new getParameter_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getParameterTest1(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status getParameterTest1() @@ -57,6 +62,13 @@ public Status getParameterTest1() return Status.failed("getBaseType(void) test failed"); } +@Test +public void testGetParameterTest2() throws IOException +{ + Status s = getParameterTest2(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status getParameterTest2() { try { diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/getParameters_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/getParameters_Test.java similarity index 77% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/getParameters_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/getParameters_Test.java index 7e17940..56f111e 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/getParameters_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/getParameters_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,11 +16,17 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeType; -import java.io.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; import java.util.Enumeration; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeType; +import jakarta.activation.MimeTypeParameterList; /** * Create a MimeType instance, use it to call getParameters() method, if it @@ -28,15 +34,15 @@ * otherwise it fails. */ -public class getParameters_Test extends MultiTest +public class getParameters_Test { -public static void main(String argv[]) -{ - getParameters_Test lTest = new getParameters_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); -} + @Test + public void testGetParametersTest() throws IOException + { + Status s = getParametersTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); + } public Status getParametersTest() { diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/getPrimaryType_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/getPrimaryType_Test.java similarity index 76% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/getPrimaryType_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/getPrimaryType_Test.java index fda7273..2641ac7 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/getPrimaryType_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/getPrimaryType_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,15 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeType; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeType; /** * Create a MimeType instance, use it to call getPrimaryType() method, if it @@ -27,13 +32,13 @@ * otherwise it fails. */ -public class getPrimaryType_Test extends MultiTest +public class getPrimaryType_Test { -public static void main(String argv[]) +@Test +public void testGetPrimaryTypeTest1() throws IOException { - getPrimaryType_Test lTest = new getPrimaryType_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getPrimaryTypeTest1(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status getPrimaryTypeTest1() @@ -55,6 +60,13 @@ public Status getPrimaryTypeTest1() return Status.passed("getPrimaryType(void) test succeeded"); } +@Test +public void testGetPrimaryTypeTest2() throws IOException +{ + Status s = getPrimaryTypeTest2(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status getPrimaryTypeTest2() { try { diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/getSubType_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/getSubType_Test.java similarity index 78% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/getSubType_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/getSubType_Test.java index 7b4ced6..b75a0ca 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/getSubType_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/getSubType_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,24 +16,27 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeType; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeType; /** * Create a MimeType instance, use it to call getSubType() method, if * it returns subtype string of this object then this test passes. */ -public class getSubType_Test extends MultiTest +public class getSubType_Test { -public static void main(String argv[]) +@Test +public void testGetSubTypeTest1() { - getSubType_Test lTest = new getSubType_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getSubTypeTest1(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status getSubTypeTest1() @@ -56,6 +59,13 @@ public Status getSubTypeTest1() return Status.passed("getSubType(void) test succeeded"); } +@Test +public void testGetSubTypeTest2() +{ + Status s = getSubTypeTest2(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status getSubTypeTest2() { try { diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/match_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/match_Test.java similarity index 84% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/match_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/match_Test.java index 3558a6f..d0988bd 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/match_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/match_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeType; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeType; /** Test: boolean match(MimeType); Determine of the primary and sub type @@ -33,13 +36,13 @@ Create a MimeType instance, use it to call match() method with this test passes otherwise it fails. */ -public class match_Test extends MultiTest +public class match_Test { -public static void main(String argv[]) +@Test +public void testMatchTest1() { - match_Test lTest = new match_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = matchTest1(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status matchTest1() @@ -69,6 +72,13 @@ public Status matchTest1() return Status.passed("match(MimeType) test succeeded"); } +@Test +public void testMatchTest2() +{ + Status s = matchTest2(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status matchTest2() { try { // create MimeType object using constructor diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/readExternal_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/readExternal_Test.java similarity index 80% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/readExternal_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/readExternal_Test.java index 056f035..e0d9135 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/readExternal_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/readExternal_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,20 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeType; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.io.ObjectInput; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeType; /** Test: readExternal(ObjectInput);

* @@ -30,13 +40,13 @@ * both string values match then this testcase passes, otherwise it fails. */ -public class readExternal_Test extends MultiTest +public class readExternal_Test { -public static void main(String argv[]) +@Test +public void testReadExternalTest() { - readExternal_Test lTest = new readExternal_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = readExternalTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status readExternalTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/removeParameter_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/removeParameter_Test.java similarity index 80% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/removeParameter_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/removeParameter_Test.java index 0404d95..65b120d 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/removeParameter_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/removeParameter_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeType; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeType; /** * Create a MimeType instance, use it to call removeParameter() method with @@ -27,14 +30,14 @@ * (since it has been deleted), then this test passes otherwise it fails. */ -public class removeParameter_Test extends MultiTest +public class removeParameter_Test { -public static void main(String argv[]) +@Test +public void testRemoveParameterTest() { - removeParameter_Test lTest = new removeParameter_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = removeParameterTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status removeParameterTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/setParameter_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/setParameter_Test.java similarity index 80% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/setParameter_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/setParameter_Test.java index d2455a4..1a54683 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/setParameter_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/setParameter_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeType; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeType; /** * Create a MimeType instance, use it to call setParameter() method @@ -27,13 +30,13 @@ * values are equal, then this test passes otherwise it fails. */ -public class setParameter_Test extends MultiTest +public class setParameter_Test { -public static void main(String argv[]) +@Test +public void testSetParameterTest() { - setParameter_Test lTest = new setParameter_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = setParameterTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status setParameterTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/setPrimaryType_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/setPrimaryType_Test.java similarity index 81% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/setPrimaryType_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/setPrimaryType_Test.java index c48e20e..4ccd332 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/setPrimaryType_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/setPrimaryType_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeType; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeType; /** * Create a MimeType instance, use it to call setPrimaryType() method @@ -27,13 +30,13 @@ * set/get values are equal, then this test passes otherwise it fails. */ -public class setPrimaryType_Test extends MultiTest +public class setPrimaryType_Test { -public static void main(String argv[]) +@Test +public void testSetPrimaryTypeTest() { - setPrimaryType_Test lTest = new setPrimaryType_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = setPrimaryTypeTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status setPrimaryTypeTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/setSubType_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/setSubType_Test.java similarity index 79% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/setSubType_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/setSubType_Test.java index 0163509..8f8c1a2 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/setSubType_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/setSubType_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeType; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeType; /** * Create a MimeType instance, use it to call setSubType() method @@ -27,13 +30,13 @@ * value is equal, then this test passes otherwise it fails. */ -public class setSubType_Test extends MultiTest +public class setSubType_Test { -public static void main(String argv[]) +@Test +public void testSetSubTypeTest() { - setSubType_Test lTest = new setSubType_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = setSubTypeTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status setSubTypeTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/toString_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/toString_Test.java similarity index 79% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/toString_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/toString_Test.java index e7914f3..1d796da 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/toString_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/toString_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeType; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeType; /** * Create a MimeType instance, use it to call toString() method, @@ -27,13 +30,13 @@ * object, then this test passes otherwise it fails. */ -public class toString_Test extends MultiTest +public class toString_Test { -public static void main(String argv[]) +@Test +public void testToStringTest1() { - toString_Test lTest = new toString_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = toStringTest1(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status toStringTest1() @@ -55,6 +58,13 @@ public Status toStringTest1() return Status.passed("toString(void) test succeeded"); } +@Test +public void testToStringTest2() +{ + Status s = toStringTest2(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status toStringTest2() { try { diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/writeExternal_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/writeExternal_Test.java similarity index 77% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/writeExternal_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/writeExternal_Test.java index 88973a7..d8fdd14 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/writeExternal_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeType/writeExternal_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,18 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeType; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.FileOutputStream; +import java.io.ObjectOutput; +import java.io.ObjectOutputStream; +import java.io.OutputStream; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeType; /** Test: writeExternal(ObjectOutput);

* @@ -29,13 +37,13 @@ * and arrays. If this invocation is successfull then this test passes. */ -public class writeExternal_Test extends MultiTest +public class writeExternal_Test { -public static void main(String argv[]) +@Test +public void testWriteExternalTest() { - writeExternal_Test lTest = new writeExternal_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = writeExternalTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status writeExternalTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/MimeTypeParameterList_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/MimeTypeParameterList_Test.java similarity index 75% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/MimeTypeParameterList_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/MimeTypeParameterList_Test.java index d08b7b0..ea84269 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/MimeTypeParameterList_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/MimeTypeParameterList_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,13 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeTypeParameterList; -import java.beans.*; -import java.io.*; -import jakarta.activation.*; -import java.net.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeTypeParameterList; /** * Create MimeTypeParameterList objects using constructors listed below:

@@ -33,14 +33,14 @@ * If this operation is successfull then this testcase passes, otherwise it fails. */ -public class MimeTypeParameterList_Test extends MultiTest +public class MimeTypeParameterList_Test { -public static void main(String argv[]) +@Test +public void testMimeTypeParameterListTest() { - MimeTypeParameterList_Test lTest = new MimeTypeParameterList_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = mimeTypeParameterListTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status mimeTypeParameterListTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/getNames_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/getNames_Test.java similarity index 75% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/getNames_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/getNames_Test.java index f4e61a1..415ae3b 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/getNames_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/getNames_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,14 +16,15 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeTypeParameterList; -import java.beans.*; -import java.io.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + import java.util.Enumeration; -import jakarta.activation.*; -import java.net.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeTypeParameterList; /** * Create an instance of MimeTypeParameterList, then use it to call getNames() method, @@ -31,13 +32,13 @@ * passes, otherwise it fails. */ -public class getNames_Test extends MultiTest +public class getNames_Test { -public static void main(String argv[]) +@Test +public void testGetNamesTest() { - getNames_Test lTest = new getNames_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getNamesTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status getNamesTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/get_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/get_Test.java similarity index 78% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/get_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/get_Test.java index e69e9f1..18520c8 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/get_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/get_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,13 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeTypeParameterList; -import java.beans.*; -import java.io.*; -import jakarta.activation.*; -import java.net.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeTypeParameterList; /** * Create an instance of MimeTypeParameterList, then use it to call get() method, @@ -30,13 +30,13 @@ * passed in argument, then this test passes, otherwise it fails. */ -public class get_Test extends MultiTest +public class get_Test { -public static void main(String argv[]) +@Test +public void testGetTest() { - get_Test lTest = new get_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status getTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/isEmpty_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/isEmpty_Test.java similarity index 76% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/isEmpty_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/isEmpty_Test.java index 0de0b96..3cfe5e8 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/isEmpty_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/isEmpty_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,13 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeTypeParameterList; -import java.beans.*; -import java.io.*; -import jakarta.activation.*; -import java.net.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeTypeParameterList; /** * Create an instance of MimeTypeParameterList, then use it to call isEmpty() method, @@ -30,13 +30,13 @@ * it fails. */ -public class isEmpty_Test extends MultiTest +public class isEmpty_Test { -public static void main(String argv[]) +@Test +public void testIsEmptyTest() { - isEmpty_Test lTest = new isEmpty_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = isEmptyTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status isEmptyTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/remove_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/remove_Test.java similarity index 76% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/remove_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/remove_Test.java index 9b415d7..33cd511 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/remove_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/remove_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,13 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeTypeParameterList; -import java.beans.*; -import java.io.*; -import jakarta.activation.*; -import java.net.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeTypeParameterList; /** TEST: remove(string);

* @@ -31,13 +31,13 @@ * calling get(name)], then this testcase passes, otherwise it fails. */ -public class remove_Test extends MultiTest +public class remove_Test { -public static void main(String argv[]) +@Test +public void testRemoveTest() { - remove_Test lTest = new remove_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = removeTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status removeTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/set_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/set_Test.java similarity index 77% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/set_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/set_Test.java index 1628f1e..bc630c1 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/set_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/set_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,13 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeTypeParameterList; -import java.beans.*; -import java.io.*; -import jakarta.activation.*; -import java.net.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeTypeParameterList; /** TEST: set(string name, string value);

* @@ -31,13 +31,13 @@ * then this testcase passes, otherwise it fails. */ -public class set_Test extends MultiTest +public class set_Test { -public static void main(String argv[]) +@Test +public void testSetTest() { - set_Test lTest = new set_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = setTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status setTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/size_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/size_Test.java similarity index 76% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/size_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/size_Test.java index ad98f0d..ea13725 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/size_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/size_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,13 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeTypeParameterList; -import java.beans.*; -import java.io.*; -import jakarta.activation.*; -import java.net.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeTypeParameterList; /** * Create an instance of MimeTypeParameterList, then use it to call size() method, @@ -30,13 +30,13 @@ * passes, otherwise it fails. */ -public class size_Test extends MultiTest +public class size_Test { -public static void main(String argv[]) +@Test +public void testSizeTest() { - size_Test lTest = new size_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = sizeTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status sizeTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/toString_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/toString_Test.java similarity index 77% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/toString_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/toString_Test.java index aa9e1e7..d32a191 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/toString_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParameterList/toString_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,13 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeTypeParameterList; -import java.beans.*; -import java.io.*; -import jakarta.activation.*; -import java.net.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeTypeParameterList; /** * Create an instance of MimeTypeParameterList, then use it to call toString() method, @@ -30,13 +30,13 @@ * otherwise it fails. */ -public class toString_Test extends MultiTest +public class toString_Test { -public static void main(String argv[]) +@Test +public void testToStringTest() { - toString_Test lTest = new toString_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = toStringTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status toStringTest() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParseException/MimeTypeParseException_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParseException/MimeTypeParseException_Test.java similarity index 80% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParseException/MimeTypeParseException_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParseException/MimeTypeParseException_Test.java index accde9d..d4850d6 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParseException/MimeTypeParseException_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimeTypeParseException/MimeTypeParseException_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.MimeTypeParseException; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeTypeParseException; /** * We test this execption by invoking the two constructors for this class. @@ -27,20 +30,19 @@ * passes, otherwise it fails. */ -public class MimeTypeParseException_Test extends MultiTest { +public class MimeTypeParseException_Test { String msg = "MimeType parse Exception caught!"; - // main - public static void main(String[] args) + @Test + public void testMimeTypeParseEx() { - Test t = new MimeTypeParseException_Test(); - Status s = t.run(args, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - s.exit(); + Status s = test(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } // Tests for equals: - public Status testMimeTypeParseEx() + public Status test() { // We will call a method that always throws an // USDTE and look at the message diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimetypesFileTypeMap/MimetypesFileTypeMap_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimetypesFileTypeMap/MimetypesFileTypeMap_Test.java similarity index 86% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimetypesFileTypeMap/MimetypesFileTypeMap_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimetypesFileTypeMap/MimetypesFileTypeMap_Test.java index e039abd..e0a654d 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimetypesFileTypeMap/MimetypesFileTypeMap_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimetypesFileTypeMap/MimetypesFileTypeMap_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,11 +16,23 @@ package javasoft.sqe.tests.api.jakarta.activation.MimetypesFileTypeMap; -import java.io.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; import java.nio.charset.StandardCharsets; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeType; +import jakarta.activation.MimeTypeParseException; +import jakarta.activation.MimetypesFileTypeMap; /** Test: MimetypesFileTypeMap() ; default constructor

@@ -31,7 +43,7 @@ then this testcase passes, otherwise it fails. */ -public class MimetypesFileTypeMap_Test extends MultiTest +public class MimetypesFileTypeMap_Test { private final static String kRefFilename = "test.txt"; private final static String kAltFilename = "test.text"; @@ -50,11 +62,11 @@ public class MimetypesFileTypeMap_Test extends MultiTest private String message = null; private String refType = null; -public static void main(String argv[]) +@Test +public void testMimetypesFileTypeMapTest1() { - MimetypesFileTypeMap_Test lTest = new MimetypesFileTypeMap_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = MimetypesFileTypeMapTest1(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } private boolean setUpReference() @@ -139,6 +151,13 @@ public Status MimetypesFileTypeMapTest1() return Status.passed("MimetypesFileTypeMap() test succeeded"); } +@Test +public void testMimetypesFileTypeMapTest2() throws IOException +{ + Status s = MimetypesFileTypeMapTest2(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status MimetypesFileTypeMapTest2() throws IOException { if (!setUpReference()) @@ -176,6 +195,13 @@ public Status MimetypesFileTypeMapTest2() throws IOException return Status.passed("MimetypesFileTypeMap(String) test succeeded"); } +@Test +public void testMimetypesFileTypeMapTest3() throws IOException +{ + Status s = MimetypesFileTypeMapTest3(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status MimetypesFileTypeMapTest3() throws FileNotFoundException, IOException { if (!setUpReference()) diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimetypesFileTypeMap/addMimeTypes_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimetypesFileTypeMap/addMimeTypes_Test.java similarity index 85% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimetypesFileTypeMap/addMimeTypes_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimetypesFileTypeMap/addMimeTypes_Test.java index 798233e..2a308df 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimetypesFileTypeMap/addMimeTypes_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimetypesFileTypeMap/addMimeTypes_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,17 @@ package javasoft.sqe.tests.api.jakarta.activation.MimetypesFileTypeMap; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.File; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeType; +import jakarta.activation.MimeTypeParseException; +import jakarta.activation.MimetypesFileTypeMap; /** * Create an instance of MimetypesFileTypeMap then call addMimeTypes() method @@ -27,18 +34,18 @@ * otherwise it fails. */ -public class addMimeTypes_Test extends MultiTest +public class addMimeTypes_Test { private final static String kRefFilename = "test.txt"; private MimetypesFileTypeMap typesMap = null; private String message = null; private String refType = null; -public static void main(String argv[]) +@Test +public void testAddMimeTypesTest() { - addMimeTypes_Test lTest = new addMimeTypes_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = addMimeTypesTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } private boolean setUpReference() diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimetypesFileTypeMap/getContentType_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimetypesFileTypeMap/getContentType_Test.java similarity index 84% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimetypesFileTypeMap/getContentType_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimetypesFileTypeMap/getContentType_Test.java index 13865c0..4e2955e 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimetypesFileTypeMap/getContentType_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimetypesFileTypeMap/getContentType_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,17 @@ package javasoft.sqe.tests.api.jakarta.activation.MimetypesFileTypeMap; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.File; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimeType; +import jakarta.activation.MimeTypeParseException; +import jakarta.activation.MimetypesFileTypeMap; /** * Create an instance of MimetypesFileTypeMap then call getContentType() method @@ -27,7 +34,7 @@ * then this test passes, otherwise it fails. */ -public class getContentType_Test extends MultiTest +public class getContentType_Test { private final static String kRefFilename = "test.txt"; private MimetypesFileTypeMap typesMap = null; @@ -35,11 +42,11 @@ public class getContentType_Test extends MultiTest private String message = null; private String refType = null; -public static void main(String argv[]) +@Test +public void getContentTypeTest() { - getContentType_Test lTest = new getContentType_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = run(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } private boolean setUpReference() @@ -81,7 +88,7 @@ private String validateType(String fName, String expectedType) return res1; } -public Status getContentTypeTest() +public Status run() { if (!setUpReference()) return Status.failed(message); diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimetypesFileTypeMap/loadFromConf_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimetypesFileTypeMap/loadFromConf_Test.java similarity index 84% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimetypesFileTypeMap/loadFromConf_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimetypesFileTypeMap/loadFromConf_Test.java index c6b1c07..a9981cf 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimetypesFileTypeMap/loadFromConf_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimetypesFileTypeMap/loadFromConf_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,12 +16,19 @@ package javasoft.sqe.tests.api.jakarta.activation.MimetypesFileTypeMap; -import java.util.*; -import java.io.*; -import jakarta.activation.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; import java.nio.file.Files; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimetypesFileTypeMap; /** * This class tests that resource files are loaded as expected.

@@ -30,7 +37,7 @@ * how2test: Create a MimetypesFileTypeMap */ -public class loadFromConf_Test extends MultiTest { +public class loadFromConf_Test { private boolean skip = false; @@ -40,11 +47,11 @@ public class loadFromConf_Test extends MultiTest { private static final String entry1 = mimeType1 + " " + ext; private static final String entry2 = mimeType2 + " " + ext; - public static void main( String argv[] ) + @Test + public void getContentTypeTest() { - loadFromConf_Test test = new loadFromConf_Test(); - Status s = test.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - s.exit(); + Status s = loadFromConfTest(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } /** @@ -52,7 +59,8 @@ public static void main( String argv[] ) * create a fake java.home and point the System property * to it. */ - public void init() throws SetupException + @BeforeEach + public void init() { try { File home = File.createTempFile("javahome", "conf"); @@ -96,7 +104,7 @@ public void init() throws SetupException pw.println(entry2); pw.close(); } catch (IOException ioex) { - throw new SetupException(ioex.toString()); + throw new IllegalStateException(ioex.toString()); } } diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimetypesFileTypeMap/loadFromLib_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimetypesFileTypeMap/loadFromLib_Test.java similarity index 82% rename from tests/api/javasoft/sqe/tests/jakarta/activation/MimetypesFileTypeMap/loadFromLib_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimetypesFileTypeMap/loadFromLib_Test.java index 62984cd..c92dc10 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimetypesFileTypeMap/loadFromLib_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/MimetypesFileTypeMap/loadFromLib_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,12 +16,19 @@ package javasoft.sqe.tests.api.jakarta.activation.MimetypesFileTypeMap; -import java.util.*; -import java.io.*; -import jakarta.activation.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; import java.nio.file.Files; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.MimetypesFileTypeMap; /** * This class tests that resource files are loaded as expected.

@@ -30,7 +37,7 @@ * how2test: Create a MimetypesFileTypeMap */ -public class loadFromLib_Test extends MultiTest { +public class loadFromLib_Test { private boolean skip = false; @@ -38,11 +45,11 @@ public class loadFromLib_Test extends MultiTest { private static final String ext = "xyz"; private static final String entry = mimeType + " " + ext; - public static void main( String argv[] ) + @Test + public void loadFromLibTest() { - loadFromLib_Test test = new loadFromLib_Test(); - Status s = test.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - s.exit(); + Status s = run(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } /** @@ -50,7 +57,8 @@ public static void main( String argv[] ) * create a fake java.home and point the System property * to it. */ - public void init() throws SetupException + @BeforeEach + public void init() { try { File home = File.createTempFile("javahome", "conf"); @@ -83,11 +91,11 @@ public void init() throws SetupException pw.println(entry); pw.close(); } catch (IOException ioex) { - throw new SetupException(ioex.toString()); + throw new IllegalStateException(ioex.toString()); } } - public Status loadFromLibTest() + public Status run() { if (skip) return Status.passed("loadFromLib skipped"); diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/Module/UnnamedModule_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/Module/UnnamedModule_Test.java similarity index 55% rename from tests/api/javasoft/sqe/tests/jakarta/activation/Module/UnnamedModule_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/Module/UnnamedModule_Test.java index aa5b511..98f72fb 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/Module/UnnamedModule_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/Module/UnnamedModule_Test.java @@ -13,10 +13,13 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package javasoft.sqe.tests.jakarta.activation.Module; +package javasoft.sqe.tests.api.jakarta.activation.Module; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; import com.sun.javatest.Status; -import com.sun.javatest.lib.MultiTest; import jakarta.activation.DataSource; @@ -24,22 +27,26 @@ * Verify that API on module path is able to find and use an implementation, * which is provided on the classpath. */ -public class UnnamedModule_Test extends MultiTest { +public class UnnamedModule_Test { private static final String ACTIVATION_API_MODULE = "jakarta.activation"; - public static void main(String argv[]) { - UnnamedModule_Test lTest = new UnnamedModule_Test(); - Status lStatus = lTest.test(); - lStatus.exit(); + @Test + public void test() { + Status s = run(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } - public Status test() { - String moduleName = DataSource.class.getModule().getName(); - if (ACTIVATION_API_MODULE.equals(moduleName)) { - return Status.passed(moduleName); - } else { - return Status.failed(ACTIVATION_API_MODULE + " is not visible"); + public Status run() { + if (DataSource.class.getModule().isNamed()) { + String moduleName = DataSource.class.getModule().getName(); + if (ACTIVATION_API_MODULE.equals(moduleName)) { + return Status.passed(moduleName); + } else { + return Status.failed(ACTIVATION_API_MODULE + " is not visible "); + } + } else { + return Status.passed("Skipping test because it is not running in modules"); } } diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestActivationDataFlavor.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestActivationDataFlavor.java similarity index 94% rename from tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestActivationDataFlavor.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestActivationDataFlavor.java index 5446c87..f70fc9c 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestActivationDataFlavor.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestActivationDataFlavor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestCommandMap.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestCommandMap.java similarity index 97% rename from tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestCommandMap.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestCommandMap.java index d0858ed..815a42f 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestCommandMap.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestCommandMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestCommandObject.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestCommandObject.java similarity index 94% rename from tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestCommandObject.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestCommandObject.java index 8d330c9..adbffca 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestCommandObject.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestCommandObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestDCH.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestDCH.java similarity index 96% rename from tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestDCH.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestDCH.java index 0ed480b..142b71f 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestDCH.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestDCH.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestDCHFactory.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestDCHFactory.java similarity index 94% rename from tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestDCHFactory.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestDCHFactory.java index 3c87119..3cd4459 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestDCHFactory.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestDCHFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestDataSource.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestDataSource.java similarity index 94% rename from tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestDataSource.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestDataSource.java index 4856877..7273171 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestDataSource.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestDataSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestFileTypeMap.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestFileTypeMap.java similarity index 93% rename from tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestFileTypeMap.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestFileTypeMap.java index 8e41a11..01644e7 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestFileTypeMap.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestFileTypeMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestNoBeans.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestNoBeans.java similarity index 93% rename from tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestNoBeans.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestNoBeans.java index 9ceecbe..8070288 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/TestClasses/TestNoBeans.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/TestClasses/TestNoBeans.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/URLDataSource/URLDataSource_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/URLDataSource/URLDataSource_Test.java similarity index 75% rename from tests/api/javasoft/sqe/tests/jakarta/activation/URLDataSource/URLDataSource_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/URLDataSource/URLDataSource_Test.java index 167eb00..b87b07a 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/URLDataSource/URLDataSource_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/URLDataSource/URLDataSource_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,11 +16,17 @@ package javasoft.sqe.tests.api.jakarta.activation.URLDataSource; -import java.net.*; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.URLDataSource; /** * Create instances of URLDataSource, using the constructors of this class. @@ -28,17 +34,17 @@ * otherwise it fails. */ -public class URLDataSource_Test extends MultiTest +public class URLDataSource_Test { private static final String fileURLSpec = "file:test.txt"; private static final String httpURLSpec = "http://www.sun.com/index.html"; private static final String badURLSpec = "http://www.nonexistentdomain.com"; -public static void main(String argv[]) +@Test +public void testURLDataSourceTest1() throws MalformedURLException, IOException { - URLDataSource_Test lTest = new URLDataSource_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = URLDataSourceTest1(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status URLDataSourceTest1() throws IOException, MalformedURLException @@ -61,6 +67,13 @@ public Status URLDataSourceTest1() throws IOException, MalformedURLException return Status.passed("URLDataSource(URL http) test succeeded"); } +@Test +public void testURLDataSourceTest2() throws MalformedURLException, IOException +{ + Status s = URLDataSourceTest2(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status URLDataSourceTest2() throws IOException, MalformedURLException { URL goodURL = new URL(fileURLSpec); @@ -72,6 +85,13 @@ public Status URLDataSourceTest2() throws IOException, MalformedURLException return Status.passed("URLDataSource(URL goodURL) test succeeded"); } +@Test +public void testURLDataSourceTest3() throws MalformedURLException, IOException +{ + Status s = URLDataSourceTest3(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status URLDataSourceTest3() throws IOException, MalformedURLException { URL badURL = new URL(badURLSpec); diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/URLDataSource/getContentType_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/URLDataSource/getContentType_Test.java similarity index 82% rename from tests/api/javasoft/sqe/tests/jakarta/activation/URLDataSource/getContentType_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/URLDataSource/getContentType_Test.java index 3fa89d0..09a6081 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/URLDataSource/getContentType_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/URLDataSource/getContentType_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,11 +16,19 @@ package javasoft.sqe.tests.api.jakarta.activation.URLDataSource; -import java.net.*; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.File; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.URLDataSource; // Returns the value of the content-type header field of the URL. @@ -30,17 +38,18 @@ * it fails. */ -public class getContentType_Test extends MultiTest +public class getContentType_Test { private static final String badURLSpec = "http://www.xyznonexistentdomain.com"; -public static void main(String argv[]) +@Test +public void testGetContentTypeTest1() throws MalformedURLException, IOException { - getContentType_Test lTest = new getContentType_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getContentTypeTest1(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } + @SuppressWarnings("deprecation") public Status getContentTypeTest1() throws IOException, MalformedURLException { @@ -86,6 +95,13 @@ public Status getContentTypeTest1() throws IOException, MalformedURLException return Status.passed("getContentType() test succeeded"); } +@Test +public void testGetContentTypeTest2() throws MalformedURLException, IOException +{ + Status s = getContentTypeTest2(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status getContentTypeTest2() throws IOException, MalformedURLException { URL badURL = new URL(badURLSpec); diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/URLDataSource/getInputStream_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/URLDataSource/getInputStream_Test.java similarity index 77% rename from tests/api/javasoft/sqe/tests/jakarta/activation/URLDataSource/getInputStream_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/URLDataSource/getInputStream_Test.java index e68c390..72e8a11 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/URLDataSource/getInputStream_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/URLDataSource/getInputStream_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,11 +16,20 @@ package javasoft.sqe.tests.api.jakarta.activation.URLDataSource; -import java.net.*; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.MalformedURLException; +import java.net.URL; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.URLDataSource; /** * Create an instance of URLDataSource, use it call getInputStream() api, if @@ -28,16 +37,16 @@ * otherwise it fails. */ -public class getInputStream_Test extends MultiTest { +public class getInputStream_Test { private static final String fileName = "test.txt1"; private static final String badURLSpec = "http://www.adfkasdklfjdsaf.com/"; -public static void main(String argv[]) +@Test +public void testGetInputStreamTest1() throws MalformedURLException, IOException { - getInputStream_Test lTest = new getInputStream_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getInputStreamTest1(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } @SuppressWarnings("deprecation") @@ -59,6 +68,13 @@ public Status getInputStreamTest1() throws IOException, MalformedURLException return Status.passed("getInputStream() test succeeded"); } +@Test +public void testGetInputStreamTest2() throws MalformedURLException, IOException +{ + Status s = getInputStreamTest2(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status getInputStreamTest2() throws IOException, MalformedURLException { URL badURL = new URL(badURLSpec); diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/URLDataSource/getName_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/URLDataSource/getName_Test.java similarity index 80% rename from tests/api/javasoft/sqe/tests/jakarta/activation/URLDataSource/getName_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/URLDataSource/getName_Test.java index 97dff23..52108ba 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/URLDataSource/getName_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/URLDataSource/getName_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,11 +16,17 @@ package javasoft.sqe.tests.api.jakarta.activation.URLDataSource; -import java.net.*; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.URLDataSource; // Calls the getFile method on the URL used to instantiate the object. @@ -29,16 +35,16 @@ * returns a non-null expected string, then this testcase passes, otherwise it fails. */ -public class getName_Test extends MultiTest +public class getName_Test { private static final String httpURLSpec = "http://www.sun.com/index.html"; private static final String badURLSpec = "http://www.nonexistentdomain.com"; -public static void main(String argv[]) +@Test +public void testGetName_Test() throws MalformedURLException, IOException { - getName_Test lTest = new getName_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getName_Test(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status getName_Test() throws IOException, MalformedURLException diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/URLDataSource/getOutputStream_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/URLDataSource/getOutputStream_Test.java similarity index 78% rename from tests/api/javasoft/sqe/tests/jakarta/activation/URLDataSource/getOutputStream_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/URLDataSource/getOutputStream_Test.java index 317d386..b2c3cfd 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/URLDataSource/getOutputStream_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/URLDataSource/getOutputStream_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,11 +16,21 @@ package javasoft.sqe.tests.api.jakarta.activation.URLDataSource; -import java.net.*; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.UnknownServiceException; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.URLDataSource; /** * Create an instance of URLDataSource, use it call getOutputStream() api, if @@ -28,15 +38,15 @@ * otherwise it fails. */ -public class getOutputStream_Test extends MultiTest { +public class getOutputStream_Test { private static final String badURLSpec = "http://www.adfkasdklfjdsaf.com/"; -public static void main(String argv[]) +@Test +public void testGetOutputStreamTest1() throws MalformedURLException, IOException { - getOutputStream_Test lTest = new getOutputStream_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getOutputStreamTest1(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } @SuppressWarnings("deprecation") @@ -55,6 +65,13 @@ public Status getOutputStreamTest1() throws IOException, MalformedURLException return Status.passed("getOutputStream() test succeeded"); } +@Test +public void testGetOutputStreamTest2() throws MalformedURLException, IOException +{ + Status s = getOutputStreamTest2(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); +} + public Status getOutputStreamTest2() throws IOException, MalformedURLException { URL badURL = new URL(badURLSpec); diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/URLDataSource/getURL_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/URLDataSource/getURL_Test.java similarity index 74% rename from tests/api/javasoft/sqe/tests/jakarta/activation/URLDataSource/getURL_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/URLDataSource/getURL_Test.java index efbdc24..5adc2ef 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/URLDataSource/getURL_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/URLDataSource/getURL_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,11 +16,17 @@ package javasoft.sqe.tests.api.jakarta.activation.URLDataSource; -import java.net.*; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.URLDataSource; /** * Create an instance of URLDataSource, use it call getURL() api, if it @@ -28,16 +34,16 @@ * otherwise it fails. */ -public class getURL_Test extends MultiTest +public class getURL_Test { private static final String httpURLSpec = "http://www.sun.com/index.html"; private static final String badURLSpec = "http://www.nonexistentdomain.com"; -public static void main(String argv[]) +@Test +public void testGetURL_Test() throws MalformedURLException, IOException { - getURL_Test lTest = new getURL_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); + Status s = getURL_Test(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } public Status getURL_Test() throws IOException, MalformedURLException diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/UnsupportedDataTypeException/UnsupportedDTException_Test.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/UnsupportedDataTypeException/UnsupportedDTException_Test.java similarity index 80% rename from tests/api/javasoft/sqe/tests/jakarta/activation/UnsupportedDataTypeException/UnsupportedDTException_Test.java rename to tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/UnsupportedDataTypeException/UnsupportedDTException_Test.java index da5ed25..144edea 100644 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/UnsupportedDataTypeException/UnsupportedDTException_Test.java +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/UnsupportedDataTypeException/UnsupportedDTException_Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,10 +16,13 @@ package javasoft.sqe.tests.api.jakarta.activation.UnsupportedDataTypeException; -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import com.sun.javatest.lib.MultiTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +import com.sun.javatest.Status; + +import jakarta.activation.UnsupportedDataTypeException; /** * We test this execption by invoking the two constructors for this class. @@ -27,21 +30,20 @@ * passes, otherwise it fails. */ -public class UnsupportedDTException_Test extends MultiTest { +public class UnsupportedDTException_Test { String msg = "unsupported data type exception"; - // main - public static void main(String[] args) + @Test + public void testUnsupportedDTEx() { - Test t = new UnsupportedDTException_Test(); - Status s = t.run(args, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - s.exit(); + Status s = run(); + assertEquals(Status.PASSED, s.getType(), "Status " + s); } // Tests for equals: - public Status testUnsupportedDTEx() + public Status run() { // We will call a method that always throws an // USDTE and look at the message diff --git a/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/sigtest/SignatureTest.java b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/sigtest/SignatureTest.java new file mode 100644 index 0000000..8cc49d4 --- /dev/null +++ b/tck/tck-tests/src/main/java/javasoft/sqe/tests/api/jakarta/activation/sigtest/SignatureTest.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package javasoft.sqe.tests.api.jakarta.activation.sigtest; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.file.Files; +import java.util.ArrayList; +import java.util.List; + +import org.junit.jupiter.api.Test; + +/** + * Executes the signature test. + * + */ +public class SignatureTest extends com.sun.tdk.signaturetest.SignatureTest { + + private static final String SIG_FILE_NAME = System.getProperty("sigtest", "/jakarta.activation_2.0_java_11.sig"); + private static final String[] EXCLUDE_CLASSES = { + "java.util.Map", + "java.lang.Object", + "java.io.ByteArrayInputStream", + "java.io.InputStream", + "java.lang.Deprecated", + "java.io.Writer", + "java.io.OutputStream", + "java.util.List", + "java.util.Collection", + "java.lang.instrument.IllegalClassFormatException", + "javax.transaction.xa.XAException", + "java.lang.annotation.Repeatable", + "java.lang.InterruptedException", + "java.lang.CloneNotSupportedException", + "java.lang.Throwable", + "java.lang.Thread", + "java.lang.Enum" + }; + + @Test + public void test() throws IOException { + File file = new File(System.getProperty("java.io.tmpdir") + SIG_FILE_NAME); + file.deleteOnExit(); + try (InputStream inputStream = SignatureTest.class.getResourceAsStream(SIG_FILE_NAME)) { + Files.copy(inputStream, file.toPath()); + } + List commands = new ArrayList<>(); + commands.add("-Package"); + commands.add("jakarta.mail"); + commands.add("-FileName"); + commands.add(file.getAbsolutePath()); + for (String exclude : EXCLUDE_CLASSES) { + commands.add("-IgnoreJDKClass"); + commands.add(exclude); + } + try (StringWriter out = new StringWriter(); PrintWriter writer = new PrintWriter(out, true)) { + run(commands.toArray(new String[0]), writer, null); + boolean status = isPassed(); + assertTrue(status, () -> SIG_FILE_NAME + "\n" + out.toString()); + } + } + +} diff --git a/tests/jaf_10.sig b/tck/tck-tests/src/main/resources/jaf_10.sig similarity index 100% rename from tests/jaf_10.sig rename to tck/tck-tests/src/main/resources/jaf_10.sig diff --git a/tests/jaf_11.sig b/tck/tck-tests/src/main/resources/jaf_11.sig similarity index 100% rename from tests/jaf_11.sig rename to tck/tck-tests/src/main/resources/jaf_11.sig diff --git a/tests/jaf_12.sig b/tck/tck-tests/src/main/resources/jaf_12.sig similarity index 100% rename from tests/jaf_12.sig rename to tck/tck-tests/src/main/resources/jaf_12.sig diff --git a/tests/jakarta.activation_2.0_java_1.8.sig b/tck/tck-tests/src/main/resources/jakarta.activation_2.0_java_1.8.sig similarity index 100% rename from tests/jakarta.activation_2.0_java_1.8.sig rename to tck/tck-tests/src/main/resources/jakarta.activation_2.0_java_1.8.sig diff --git a/tests/jakarta.activation_2.0_java_11.sig b/tck/tck-tests/src/main/resources/jakarta.activation_2.0_java_11.sig similarity index 100% rename from tests/jakarta.activation_2.0_java_11.sig rename to tck/tck-tests/src/main/resources/jakarta.activation_2.0_java_11.sig diff --git a/tests/javax.activation_1.2_java_9.sig b/tck/tck-tests/src/main/resources/javax.activation_1.2_java_9.sig similarity index 100% rename from tests/javax.activation_1.2_java_9.sig rename to tck/tck-tests/src/main/resources/javax.activation_1.2_java_9.sig diff --git a/tests/SignatureTest.html b/tests/SignatureTest.html deleted file mode 100644 index f76116d..0000000 --- a/tests/SignatureTest.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - -Jakarta Activation API Signature Test - - - -

Jakarta Activation API Signature Test

-
- -This is the API signature test for the entire jakarta.activation.* package. This -test verifies the existence of all expected public classes and interfaces. In -those public classes and interfaces it verifies the existence, correct -modifiers, arguments, and throws clauses of public constructors and methods. -It also verifies the existence and correct modifiers of public fields. - -

This test is version specific. The current version is 2.0 - -

-
title API Signature verification -
name Activation_SigTest -
source SignatureTest.java -
executeClass com.sun.tdk.signaturetest.SignatureTest -
executeArgs -TestURL $testURL - -Package jakarta.activation - -FileName jakarta.activation_2.0_java_${java.specification.version}.sig -
keywords compile execute jaf extensionAPI -
- -


-
-© 2002-2019 Oracle and/or its affiliates. All Rights Reserved
- - diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/testlist.html b/tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/testlist.html deleted file mode 100644 index d504cfa..0000000 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/ActivationDataFlavor/testlist.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - -ActivationDataFlavor - - -

ActivationDataFlavor

- - - - -These tests are designed to test the functionality of ActivationDataFlavor - - -
- - -The folling are the test descriptions for the tests developed.Links to the sources are also included. - - -

API Tests

- - - - - - - - -
titleActivationDataFlavor() Test
nameActivationDataFlavor_Test
sourceActivationDataFlavor_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.ActivationDataFlavor.ActivationDataFlavor_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titleequals() Test
nameequals_Test
sourceequals_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.ActivationDataFlavor.equals_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetHumanPresentableName() Test
namegetHumanPresentableName_Test
sourcegetHumanPresentableName_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.ActivationDataFlavor.getHumanPresentableName_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetMimeType() Test
namegetMimeType_Test
sourcegetMimeType_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.ActivationDataFlavor.getMimeType_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetRepresentationClass() Test
namegetRepresentationClass_Test
sourcegetRepresentationClass_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.ActivationDataFlavor.getRepresentationClass_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titleisMimeTypeEqual() Test
nameisMimeTypeEqual_Test
sourceisMimeTypeEqual_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.ActivationDataFlavor.isMimeTypeEqual_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlenormalizeMimeTypeParameter() Test
namenormalizeMimeTypeParameter_Test
sourcenormalizeMimeTypeParameter_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.ActivationDataFlavor.normalizeMimeTypeParameter_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlenormalizeMimeType() Test
namenormalizeMimeType_Test
sourcenormalizeMimeType_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.ActivationDataFlavor.normalizeMimeType_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlesetHumanPresentableName() Test
namesetHumanPresentableName_Test
sourcesetHumanPresentableName_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.ActivationDataFlavor.setHumanPresentableName_Test
keywordscompile execute jaf extensionAPI
-
- -
- - - diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandInfo/testlist.html b/tests/api/javasoft/sqe/tests/jakarta/activation/CommandInfo/testlist.html deleted file mode 100644 index 6e16553..0000000 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandInfo/testlist.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - -CommandInfo Test - - -

CommandInfo Test

- - - - -These tests are designed to test the functionality of CommandInfo. - - -
- - -The folling are the test descriptions for the tests developed.Links to the sources are also included. - - -

API Tests

- - - - - - - - -
titleCommandInfo Test
nameCommandInfo_Test
sourceCommandInfo_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.CommandInfo.CommandInfo_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetCommandClass Test
namegetCommandClass_Test
sourcegetCommandClass_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.CommandInfo.getCommandClass_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetCommandName Test
namegetCommandName_Test
sourcegetCommandName_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.CommandInfo.getCommandName_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetCommandObject Test
namegetCommandObject_Test
sourcegetCommandObject_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.CommandInfo.getCommandObject_Test
keywordscompile execute jaf extensionAPI
-
- -
- - - diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandMap/createDataContentHandler_Test.java b/tests/api/javasoft/sqe/tests/jakarta/activation/CommandMap/createDataContentHandler_Test.java deleted file mode 100644 index e8b87ff..0000000 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandMap/createDataContentHandler_Test.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package javasoft.sqe.tests.api.jakarta.activation.CommandMap; - -import java.io.*; -import jakarta.activation.*; -import com.sun.javatest.*; -import javasoft.sqe.tests.api.jakarta.activation.TestClasses.*; - -/** CommandMap is an abstract class. The main functional testing is in the only - * provided concrete implementation, MailcapCommandMap, done separately.

- * We get default CommandMap objedct then using it call createDataContentHandler() - * api with string parameter. If this call returns a non-null DataContentHandler - * object then this testcase passes otherwise it fails. - */ - -public class createDataContentHandler_Test implements Test -{ - public static void main(String argv[]) - { - createDataContentHandler_Test lTest = new createDataContentHandler_Test(); - Status lStatus = lTest.run(argv, new PrintWriter(System.err, true), new PrintWriter(System.out, true)); - lStatus.exit(); - } - - public Status run(String argv[], PrintWriter outLog, PrintWriter outConsole) - { - // does getDefaultCommandMap return a MailcapCommandMap ? - CommandMap lCommandMap = CommandMap.getDefaultCommandMap(); - - if (!(lCommandMap instanceof MailcapCommandMap)) - return Status.failed("getDefaultCommandMap() did not return MailcapCommandMap"); - - DataContentHandler dch = lCommandMap.createDataContentHandler("text/plain"); //API TEST - - if( dch == null ) - return Status.failed("createDataContentHandler failed to return DataContentHandler object!"); - - return Status.passed("createDataContentHandler() Test succeeded"); - } -} diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandMap/testlist.html b/tests/api/javasoft/sqe/tests/jakarta/activation/CommandMap/testlist.html deleted file mode 100644 index 0a112fd..0000000 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/CommandMap/testlist.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - -CommandMap - - -

CommandMap

- - - - -These tests are designed to test the functionality of CommandMap - - -
- - -The folling are the test descriptions for the tests developed.Links to the sources are also included. - - -

API Tests

- - - - - - - - -
titlegetAllCommands() Test
namegetAllCommands_Test
sourcegetAllCommands_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.CommandMap.getAllCommands_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlecreateDataContentHandler() Test
namecreateDataContentHandler_Test
sourcecreateDataContentHandler_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.CommandMap.createDataContentHandler_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetCommand() Test
namegetCommand_Test
sourcegetCommand_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.CommandMap.getCommand_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetDefaultCommandMap() Test
namegetDefaultCommandMap_Test
sourcegetDefaultCommandMap_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.CommandMap.getDefaultCommandMap_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetPreferredCommands() Test
namegetPreferredCommands_Test
sourcegetPreferredCommands_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.CommandMap.getPreferredCommands_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlesetDefaultCommandMap() Test
namesetDefaultCommandMap_Test
sourcesetDefaultCommandMap_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.CommandMap.setDefaultCommandMap_Test
keywordscompile execute jaf extensionAPI
-
- -
- - - diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/testlist.html b/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/testlist.html deleted file mode 100644 index 0451691..0000000 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/DataHandler/testlist.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - -DataHandler - - -

DataHandler

- - - - -These tests are designed to test the functionality of DataHandler - - -
- - -The folling are the test descriptions for the tests developed.Links to the sources are also included. - - -

API Tests

- - - - - - - - -
titleDataHandler() Test
nameDataHandler_Test
sourceDataHandler_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.DataHandler.DataHandler_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetAllCommands() Test
namegetAllCommands_Test
sourcegetAllCommands_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.DataHandler.getAllCommands_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetBean() Test
namegetBean_Test
sourcegetBean_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.DataHandler.getBean_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetCommand() Test
namegetCommand_Test
sourcegetCommand_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.DataHandler.getCommand_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetContentType() Test
namegetContentType_Test
sourcegetContentType_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.DataHandler.getContentType_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetContent() Test
namegetContent_Test
sourcegetContent_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.DataHandler.getContent_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetDataSource() Test
namegetDataSource_Test
sourcegetDataSource_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.DataHandler.getDataSource_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetInputStream() Test
namegetInputStream_Test
sourcegetInputStream_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.DataHandler.getInputStream_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetName() Test
namegetName_Test
sourcegetName_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.DataHandler.getName_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetOutputStream() Test
namegetOutputStream_Test
sourcegetOutputStream_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.DataHandler.getOutputStream_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetPreferredCommands() Test
namegetPreferredCommands_Test
sourcegetPreferredCommands_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.DataHandler.getPreferredCommands_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetTransferDataFlavors() Test
namegetTransferDataFlavors_Test
sourcegetTransferDataFlavors_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.DataHandler.getTransferDataFlavors_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetTransferData() Test
namegetTransferData_Test
sourcegetTransferData_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.DataHandler.getTransferData_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titleisDataFlavorSupported() Test
nameisDataFlavorSupported_Test
sourceisDataFlavorSupported_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.DataHandler.isDataFlavorSupported_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlesetDataContentHandlerFactory() Test
namesetDataContentHandlerFactory_Test
sourcesetDataContentHandlerFactory_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.DataHandler.setDataContentHandlerFactory_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlesetCommandMap() Test
namesetCommandMap_Test
sourcesetCommandMap_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.DataHandler.setCommandMap_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlewriteTo() Test
namewriteTo_Test
sourcewriteTo_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.DataHandler.writeTo_Test
keywordscompile execute jaf extensionAPI
-
- -
- - - diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/testlist.html b/tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/testlist.html deleted file mode 100644 index 19f6ab4..0000000 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/FileDataSource/testlist.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - -FileDataSource - - -

FileDataSource

- - - - -These tests are designed to test the functionality of FileDataSource - - -
- - -The folling are the test descriptions for the tests developed.Links to the sources are also included. - - -

API Tests

- - - - - - - - -
titleFileDataSource() APIs
nameFileDataSource_Test
sourceFileDataSource_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.FileDataSource.FileDataSource_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetContentType() API
namegetContentType_Test
sourcegetContentType_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.FileDataSource.getContentType_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetFile() API
namegetFile_Test
sourcegetFile_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.FileDataSource.getFile_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetInputStream() API
namegetInputStream_Test
sourcegetInputStream_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.FileDataSource.getInputStream_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetName() API
namegetName_Test
sourcegetName_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.FileDataSource.getName_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetOutputStream() APIs
namegetOutputStream_Test
sourcegetOutputStream_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.FileDataSource.getOutputStream_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlesetFileTypeMap() APIs
namesetFileTypeMap_Test
sourcesetFileTypeMap_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.FileDataSource.setFileTypeMap_Test
keywordscompile execute jaf extensionAPI
-
- -
- - - diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/FileTypeMap/testlist.html b/tests/api/javasoft/sqe/tests/jakarta/activation/FileTypeMap/testlist.html deleted file mode 100644 index c5a62ea..0000000 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/FileTypeMap/testlist.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - -FileTypeMap - - -

FileTypeMap

- - - - -These tests are designed to test the functionality of FileTypeMap. - - -
- - -The folling are the test descriptions for the tests developed.Links to the sources are also included. - - -

API Tests

- - - - - - - - -
titleFileTypeMap() APIs
nameFileTypeMap_Test
sourceFileTypeMap_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.FileTypeMap.FileTypeMap_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetContentType() API
namegetContentType_Test
sourcegetContentType_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.FileTypeMap.getContentType_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetDefaultFileTypeMap() API
namegetDefaultFileTypeMap_Test
sourcegetDefaultFileTypeMap_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.FileTypeMap.getDefaultFileTypeMap_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlesetDefaultFileTypeMap() API
namesetDefaultFileTypeMap_Test
sourcesetDefaultFileTypeMap_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.FileTypeMap.setDefaultFileTypeMap_Test
keywordscompile execute jaf extensionAPI
-
- -
- - - diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/testlist.html b/tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/testlist.html deleted file mode 100644 index 9cead28..0000000 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MailcapCommandMap/testlist.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - -MailcapCommandMap - - -

MailcapCommandMap

- - - - -These tests are designed to test the functionality of MailcapCommandMap - - -
- - -The following are the test descriptions for the tests developed. Links to the sources are also included. - - -

API Tests

- - - - - - - - -
titleMailcapCommandMap() Test
nameMailcapCommandMap_Test
sourceMailcapCommandMap_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MailcapCommandMap.MailcapCommandMap_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titleaddMailcap() Test
nameaddMailcap_Test
sourceaddMailcap_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MailcapCommandMap.addMailcap_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlecreateDataContentHandler() Test
namecreateDataContentHandler_Test
sourcecreateDataContentHandler_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MailcapCommandMap.createDataContentHandler_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetAllCommands() Test
namegetAllCommands_Test
sourcegetAllCommands_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MailcapCommandMap.getAllCommands_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetCommand() Test
namegetCommand_Test
sourcegetCommand_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MailcapCommandMap.getCommand_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetPreferredCommands() Test
namegetPreferredCommands_Test
sourcegetPreferredCommands_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MailcapCommandMap.getPreferredCommands_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titleloadFromConf_Test() Test
nameloadFromConf_Test
sourceloadFromConf_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MailcapCommandMap.loadFromConf_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titleloadFromLib_Test() Test
nameloadFromLib_Test
sourceloadFromLib_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MailcapCommandMap.loadFromLib_Test
keywordscompile execute jaf extensionAPI
-
- -
- - - diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/testlist.html b/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/testlist.html deleted file mode 100644 index c1e0318..0000000 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeType/testlist.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - -MimeType - - -

MimeType

- - - - -These tests are designed to test the functionality of MimeType - - -
- - -The folling are the test descriptions for the tests developed.Links to the sources are also included. - - -

API Tests

- - - - - - - - -
titleMimeType() Test
nameMimeType_Test
sourceMimeType_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeType.MimeType_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetBaseType() Test
namegetBaseType_Test
sourcegetBaseType_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeType.getBaseType_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetParameter() Test
namegetParameter_Test
sourcegetParameter_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeType.getParameter_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetParameters() Test
namegetParameters_Test
sourcegetParameters_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeType.getParameters_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetPrimaryType() Test
namegetPrimaryType_Test
sourcegetPrimaryType_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeType.getPrimaryType_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetSubType() Test
namegetSubType_Test
sourcegetSubType_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeType.getSubType_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlematch() Test
namematch_Test
sourcematch_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeType.match_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlereadExternal() Test
namereadExternal_Test
sourcereadExternal_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeType.readExternal_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titleremoveParameter() Test
nameremoveParameter_Test
sourceremoveParameter_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeType.removeParameter_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlesetParameter() Test
namesetParameter_Test
sourcesetParameter_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeType.setParameter_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlesetPrimaryType() Test
namesetPrimaryType_Test
sourcesetPrimaryType_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeType.setPrimaryType_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlesetSubType() Test
namesetSubType_Test
sourcesetSubType_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeType.setSubType_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titletoString() Test
nametoString_Test
sourcetoString_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeType.toString_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlewriteExternal() Test
namewriteExternal_Test
sourcewriteExternal_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeType.writeExternal_Test
keywordscompile execute jaf extensionAPI
-
- -
- - - diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/testlist.html b/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/testlist.html deleted file mode 100644 index 1c6d2fe..0000000 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParameterList/testlist.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - -MimeTypeParameterList - - -

MimeTypeParameterList

- - - - -These tests are designed to test the functionality of MimeTypeParameterList - - -
- - -The folling are the test descriptions for the tests developed.Links to the sources are also included. - - -

API Tests

- - - - - - - - -
titleMimeTypeParameterList() Test
nameMimeTypeParameterList_Test
sourceMimeTypeParameterList_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeTypeParameterList.MimeTypeParameterList_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetNames() Test
namegetNames_Test
sourcegetNames_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeTypeParameterList.getNames_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titleget() Test
nameget_Test
sourceget_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeTypeParameterList.get_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titleisEmpty() Test
nameisEmpty_Test
sourceisEmpty_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeTypeParameterList.isEmpty_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titleremove() Test
nameremove_Test
sourceremove_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeTypeParameterList.remove_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titleset() Test
nameset_Test
sourceset_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeTypeParameterList.set_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlesize() Test
namesize_Test
sourcesize_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeTypeParameterList.size_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titletoString() Test
nametoString_Test
sourcetoString_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeTypeParameterList.toString_Test
keywordscompile execute jaf extensionAPI
-
- -
- - - diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParseException/testlist.html b/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParseException/testlist.html deleted file mode 100644 index 6024559..0000000 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimeTypeParseException/testlist.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - -MimeTypeParseException - - -

MimeTypeParseException

- - - - -These tests are designed to test the functionality of MimeTypeParseException - - -
- - -The folling are the test descriptions for the tests developed.Links to the sources are also included. - - -

API Tests

- - - - - - - - -
titleMimeTypeParseException() Test
nameMimeTypeParseException_Test
sourceMimeTypeParseException_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimeTypeParseException.MimeTypeParseException_Test
keywordscompile execute jaf extensionAPI
-
- -
- - - diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/MimetypesFileTypeMap/testlist.html b/tests/api/javasoft/sqe/tests/jakarta/activation/MimetypesFileTypeMap/testlist.html deleted file mode 100644 index 37bd04b..0000000 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/MimetypesFileTypeMap/testlist.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - -MimetypesFileTypeMap - - -

MimetypesFileTypeMap

- - - - -These tests are designed to test the functionality of MimetypesFileTypeMap - - -
- - -The following are the test descriptions for the tests developed. Links to the sources are also included. - - -

API Tests

- - - - - - - - -
titleMimetypesFileTypeMap() APIs
nameMimetypesFileTypeMap_Test
sourceMimetypesFileTypeMap_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimetypesFileTypeMap.MimetypesFileTypeMap_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titleaddMimeTypes() Test
nameaddMimeTypes_Test
sourceaddMimeTypes_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimetypesFileTypeMap.addMimeTypes_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetContentType() Test
namegetContentType_Test
sourcegetContentType_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimetypesFileTypeMap.getContentType_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titleloadFromConf_Test() Test
nameloadFromConf_Test
sourceloadFromConf_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimetypesFileTypeMap.loadFromConf_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titleloadFromLib_Test() Test
nameloadFromLib_Test
sourceloadFromLib_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.MimetypesFileTypeMap.loadFromLib_Test
keywordscompile execute jaf extensionAPI
-
- -
- - - diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/Module/testlist.html b/tests/api/javasoft/sqe/tests/jakarta/activation/Module/testlist.html deleted file mode 100644 index 48fd5a2..0000000 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/Module/testlist.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - -MailcapRegistryProvider and MimeTypeRegistryProvider - - -

FileTypeMap

- - - - -Verify that API on module path is able to find and use an implementation, which is provided on the classpath. - - -
- - -The following are the test descriptions for the tests developed.Links to the sources are also included. - - -

API Tests

- - - - - - - - -
titleUnnamedModule_Test() API
nametest
sourceUnnamedModule_Test.java
executeClassjavasoft.sqe.tests.jakarta.activation.Module.UnnamedModule_Test
keywords
-
- -
- - - diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/URLDataSource/testlist.html b/tests/api/javasoft/sqe/tests/jakarta/activation/URLDataSource/testlist.html deleted file mode 100644 index 0daba87..0000000 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/URLDataSource/testlist.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - -URLDataSource - - -

URLDataSource

- - - - -These tests are designed to test the functionality of URLDataSource - - -
- - -The folling are the test descriptions for the tests developed.Links to the sources are also included. - - -

API Tests

- - - - - - - - -
titleURLDataSource() Test
nameURLDataSource_Test
sourceURLDataSource_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.URLDataSource.URLDataSource_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetContentType() Test
namegetContentType_Test
sourcegetContentType_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.URLDataSource.getContentType_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetInputStream() Test
namegetInputStream_Test
sourcegetInputStream_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.URLDataSource.getInputStream_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetName() Test
namegetName_Test
sourcegetName_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.URLDataSource.getName_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetOutputStream() Test
namegetOutputStream_Test
sourcegetOutputStream_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.URLDataSource.getOutputStream_Test
keywordscompile execute jaf extensionAPI
-
- - - - - - - - -
titlegetURL() API Test
namegetURL_Test
sourcegetURL_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.URLDataSource.getURL_Test
keywordscompile execute jaf extensionAPI
-
- -
- - - diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/UnsupportedDataTypeException/testlist.html b/tests/api/javasoft/sqe/tests/jakarta/activation/UnsupportedDataTypeException/testlist.html deleted file mode 100644 index d4839e4..0000000 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/UnsupportedDataTypeException/testlist.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - -UnsupportedDataTypeException - - -

UnsupportedDataTypeException

- - - - -These tests are designed to test the functionality of UnsupportedDataTypeException - - -
- - -The folling are the test descriptions for the tests developed.Links to the sources are also included. - - -

API Tests

- - - - - - - - -
titleUnsupportedDataTypeException() Test
nameUnsupportedDTException_Test
sourceUnsupportedDTException_Test.java
executeClassjavasoft.sqe.tests.api.jakarta.activation.UnsupportedDataTypeException.UnsupportedDTException_Test
keywordscompile execute jaf extensionAPI
-
- -
- - - diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/index.html b/tests/api/javasoft/sqe/tests/jakarta/activation/index.html deleted file mode 100644 index 11b2596..0000000 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/index.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - -jakarta.activation testsuite - - - - -

jakarta.activation testsuite

-

- -Listed below are jakarta.activation components that we have API tests for. - -

-
- -

Component Specific Tests

-
- -
ActivationDataFlavor -
Tests for jakarta.activation.ActivationDataFlavor package class -

- -
CommandInfo -
Tests for jakarta.activation.CommandInfo package class -

- -
CommandMap -
Tests for jakarta.activation.CommandMap package class -

- -
DataHandler -
Tests for jakarta.activation.DataHandler package class -

- -
FileDataSource -
Tests for jakarta.activation.FileDataSource package class -

- -
FileTypeMap -
Tests for jakarta.activation.FileTypeMap package class -

- -
MailcapCommandMap -
Tests for jakarta.activation.MailcapCommandMap package class -

- -
MimeType -
Tests for jakarta.activation.MimeType package class -

- -
MimeTypeParameterList -
Tests for jakarta.activation.MimeTypeParameterList package class -

- -
MimeTypeParseException -
Tests for jakarta.activation.MimeTypeParseException package class -

- -
MimetypesFileTypeMap -
Tests for jakarta.activation.MimetypesFileTypeMap package class -

- -
URLDataSource -
Tests for jakarta.activation.URLDataSource package class -

- -
UnsupportedDTException -
Tests for jakarta.activation.UnsupportedDataTypeException package class -

- -
-
-
- - - diff --git a/tests/api/javasoft/sqe/tests/jakarta/activation/testlist b/tests/api/javasoft/sqe/tests/jakarta/activation/testlist deleted file mode 100644 index 19fa705..0000000 --- a/tests/api/javasoft/sqe/tests/jakarta/activation/testlist +++ /dev/null @@ -1,92 +0,0 @@ -./ActivationDataFlavor/ActivationDataFlavor_Test.java -./ActivationDataFlavor/equals_Test.java -./ActivationDataFlavor/getHumanPresentableName_Test.java -./ActivationDataFlavor/getMimeType_Test.java -./ActivationDataFlavor/getRepresentationClass_Test.java -./ActivationDataFlavor/isMimeTypeEqual_Test.java -./ActivationDataFlavor/normalizeMimeTypeParameter_Test.java -./ActivationDataFlavor/normalizeMimeType_Test.java -./ActivationDataFlavor/setHumanPresentableName_Test.java -./CommandInfo/CommandInfo_Test.java -./CommandInfo/getCommandClass_Test.java -./CommandInfo/getCommandName_Test.java -./CommandInfo/getCommandObject_Test.java -./CommandMap/createDataContentHandler_Test.java -./CommandMap/getAllCommands_Test.java -./CommandMap/getCommand_Test.java -./CommandMap/getDefaultCommandMap_Test.java -./CommandMap/getPreferredCommands_Test.java -./CommandMap/setDefaultCommandMap_Test.java -./DataHandler/DataHandler_Test.java -./DataHandler/getAllCommands_Test.java -./DataHandler/getBean_Test.java -./DataHandler/getCommand_Test.java -./DataHandler/getContentType_Test.java -./DataHandler/getContent_Test.java -./DataHandler/getDataSource_Test.java -./DataHandler/getInputStream_Test.java -./DataHandler/getName_Test.java -./DataHandler/getOutputStream_Test.java -./DataHandler/getPreferredCommands_Test.java -./DataHandler/getTransferDataFlavors_Test.java -./DataHandler/getTransferData_Test.java -./DataHandler/isDataFlavorSupported_Test.java -./DataHandler/setCommandMap_Test.java -./DataHandler/setDataContentHandlerFactory_Test.java -./DataHandler/setMapCommand_Test.java -./DataHandler/writeTo_Test.java -./FileDataSource/FileDataSource_Test.java -./FileDataSource/getContentType_Test.java -./FileDataSource/getFile_Test.java -./FileDataSource/getInputStream_Test.java -./FileDataSource/getName_Test.java -./FileDataSource/getOutputStream_Test.java -./FileDataSource/setFileTypeMap_Test.java -./FileTypeMap/FileTypeMap_Test.java -./FileTypeMap/getContentType_Test.java -./FileTypeMap/getDefaultFileTypeMap_Test.java -./FileTypeMap/setDefaultFileTypeMap_Test.java -./MailcapCommandMap/MailcapCommandMap_Test.java -./MailcapCommandMap/addMailcap_Test.java -./MailcapCommandMap/createDataContentHandler_Test.java -./MailcapCommandMap/getAllCommands_Test.java -./MailcapCommandMap/getCommand_Test.java -./MailcapCommandMap/getPreferredCommands_Test.java -./MailcapCommandMap/loadFromConf_Test.java -./MailcapCommandMap/loadFromLib_Test.java -./MimeType/MimeType_Test.java -./MimeType/getBaseType_Test.java -./MimeType/getParameter_Test.java -./MimeType/getParameters_Test.java -./MimeType/getPrimaryType_Test.java -./MimeType/getSubType_Test.java -./MimeType/match_Test.java -./MimeType/readExternal_Test.java -./MimeType/removeParameter_Test.java -./MimeType/setParameter_Test.java -./MimeType/setPrimaryType_Test.java -./MimeType/setSubType_Test.java -./MimeType/toString_Test.java -./MimeType/writeExternal_Test.java -./MimeTypeParameterList/MimeTypeParameterList_Test.java -./MimeTypeParameterList/getNames_Test.java -./MimeTypeParameterList/get_Test.java -./MimeTypeParameterList/isEmpty_Test.java -./MimeTypeParameterList/remove_Test.java -./MimeTypeParameterList/set_Test.java -./MimeTypeParameterList/size_Test.java -./MimeTypeParameterList/toString_Test.java -./MimeTypeParseException/MimeTypeParseException_Test.java -./MimetypesFileTypeMap/MimetypesFileTypeMap_Test.java -./MimetypesFileTypeMap/addMimeTypes_Test.java -./MimetypesFileTypeMap/getContentType_Test.java -./MimetypesFileTypeMap/loadFromConf_Test.java -./MimetypesFileTypeMap/loadFromLib_Test.java -./Module/UnnamedModule_Test.java -./URLDataSource/URLDataSource_Test.java -./URLDataSource/getContentType_Test.java -./URLDataSource/getInputStream_Test.java -./URLDataSource/getName_Test.java -./URLDataSource/getOutputStream_Test.java -./URLDataSource/getURL_Test.java -./UnsupportedDataTypeException/UnsupportedDTException_Test.java diff --git a/tests/testsuite.jtt b/tests/testsuite.jtt deleted file mode 100644 index 22621c6..0000000 --- a/tests/testsuite.jtt +++ /dev/null @@ -1,3 +0,0 @@ -name=Jakarta Activation 2.0 TCK -classpath=$TS_HOME/classes -testsuite=com.oracle.ts.lib.harness.TS