remove obsolete tests
diff --git a/src/share/classes/javasoft/sqe/api/javax/activation/util/TestActivationDataFlavor.java b/src/share/classes/javasoft/sqe/api/javax/activation/util/TestActivationDataFlavor.java deleted file mode 100644 index 436d657..0000000 --- a/src/share/classes/javasoft/sqe/api/javax/activation/util/TestActivationDataFlavor.java +++ /dev/null
@@ -1,46 +0,0 @@ -/* @(#)TestActivationDataFlavor.java 1.1 98/02/09 - * - * Copyright (c) 1997-1998 Sun Microsystems, Inc. All Rights Reserved. - * This software is the confidential and proprietary information of Sun - * Microsystems, Inc. ("Confidential Information"). You shall not - * disclose such Confidential Information and shall use it only in - * accordance with the terms of the license agreement you entered into - * with Sun. - * - * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF - * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED - * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR - * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR - * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. - */ -package javasoft.sqe.tests.api.javax.activation.TestClasses; - -import java.awt.datatransfer.*; -import javax.activation.*; - -/** - * this class extends ActivationDataFlavor and provides - * public versions of protected methods for JCK testing - */ - -public class TestActivationDataFlavor extends ActivationDataFlavor { - - public TestActivationDataFlavor(String mimeType, - String humanReadableName) - { - super(mimeType, humanReadableName); - } - - // we will only override protected methods: - public String testNormalizeMimeTypeParameter(String parameterName, - String parameterValue) - { - return super.normalizeMimeTypeParameter(parameterName,parameterValue); - } - - public String testNormalizeMimeType(String mimeType) - { - return super.normalizeMimeType(mimeType); - } -}
diff --git a/src/share/classes/javasoft/sqe/api/javax/activation/util/TestCommandMap.java b/src/share/classes/javasoft/sqe/api/javax/activation/util/TestCommandMap.java deleted file mode 100644 index 0b91731..0000000 --- a/src/share/classes/javasoft/sqe/api/javax/activation/util/TestCommandMap.java +++ /dev/null
@@ -1,84 +0,0 @@ -/* @(#)TestCommandMap.java 1.1 98/02/09 - * - * Copyright (c) 1997-1998 Sun Microsystems, Inc. All Rights Reserved. - * This software is the confidential and proprietary information of Sun - * Microsystems, Inc. ("Confidential Information"). You shall not - * disclose such Confidential Information and shall use it only in - * accordance with the terms of the license agreement you entered into - * with Sun. - * - * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF - * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED - * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR - * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR - * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. - * - */ - -package javasoft.sqe.tests.api.javax.activation.TestClasses; - -import javax.activation.*; -import javasoft.sqe.tests.api.javax.activation.TestClasses.*; - -/** This class is used to provide an alternative to the default MailcapCommandMap - * for testing purposes. It provides a number of distinct values which can be used - * to validate that it is being correctly used by a DataHandler. - */ - -public class TestCommandMap extends CommandMap { - - public static String getClassName() { - return "test.package.TestClass"; - } - - public static String getVerb() { - return "testVerb"; - } - - public static String getPreferredClassName() { - return "test.package.PreferredClass"; - } - - public static String getPreferredVerb() { - return "preferredVerb"; - } - - public static String getIncorrectMimeTypeVerb() { - return "incorrectMimeType"; - } - - private String requiredMimeType = null; - - public TestCommandMap(String requiredMimeType) - { - this.requiredMimeType = requiredMimeType; - } - - public CommandInfo[] getPreferredCommands(String mimeType) - { - CommandInfo cmdArray[] = new CommandInfo[1]; - String verb = (requiredMimeType.equals(mimeType)) ? getPreferredVerb() : getIncorrectMimeTypeVerb(); - cmdArray[0] = new CommandInfo(verb, getPreferredClassName()); - return cmdArray; - } - - public CommandInfo[] getAllCommands(String mimeType) - { - CommandInfo cmdArray[] = new CommandInfo[1]; - String verb = (requiredMimeType.equals(mimeType)) ? getVerb() : getIncorrectMimeTypeVerb(); - cmdArray[0] = new CommandInfo(verb, getClassName()); - return cmdArray; - } - - public CommandInfo getCommand(String mimeType, String cmdName) - { - String verb = (requiredMimeType.equals(mimeType)) ? cmdName : getIncorrectMimeTypeVerb(); - return new CommandInfo(verb, getClassName()); - } - - public DataContentHandler createDataContentHandler(String mimeType) - { - return (requiredMimeType.equals(mimeType)) ? new TestDCH(mimeType) : null; - } -}
diff --git a/src/share/classes/javasoft/sqe/api/javax/activation/util/TestCommandObject.java b/src/share/classes/javasoft/sqe/api/javax/activation/util/TestCommandObject.java deleted file mode 100644 index d4a3b42..0000000 --- a/src/share/classes/javasoft/sqe/api/javax/activation/util/TestCommandObject.java +++ /dev/null
@@ -1,52 +0,0 @@ -/* @(#)TestCommandObject.java 1.1 98/02/09 - * - * Copyright (c) 1997-1998 Sun Microsystems, Inc. All Rights Reserved. - * This software is the confidential and proprietary information of Sun - * Microsystems, Inc. ("Confidential Information"). You shall not - * disclose such Confidential Information and shall use it only in - * accordance with the terms of the license agreement you entered into - * with Sun. - * - * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF - * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED - * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR - * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR - * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. - */ - -package javasoft.sqe.tests.api.javax.activation.TestClasses; - -import javax.activation.*; - -/** - * This is utility library routine. - */ - -public class TestCommandObject implements CommandObject { - - private DataHandler dh = null; - private String verb = null; - private boolean wasCalled = false; - - public TestCommandObject() { - } - - public void setCommandContext(String verb, DataHandler dh) { - this.dh = dh; - this.verb = verb; - wasCalled = true; - } - - public String getVerb() { - return verb; - } - - public DataHandler getDataHandler() { - return dh; - } - - public boolean getWasCalled() { - return wasCalled; - } -}
diff --git a/src/share/classes/javasoft/sqe/api/javax/activation/util/TestDCH.java b/src/share/classes/javasoft/sqe/api/javax/activation/util/TestDCH.java deleted file mode 100644 index 13269d6..0000000 --- a/src/share/classes/javasoft/sqe/api/javax/activation/util/TestDCH.java +++ /dev/null
@@ -1,97 +0,0 @@ -/* @(#)TestDCH.java 1.1 98/02/09 - * - * Copyright (c) 1997-1998 Sun Microsystems, Inc. All Rights Reserved. - * This software is the confidential and proprietary information of Sun - * Microsystems, Inc. ("Confidential Information"). You shall not - * disclose such Confidential Information and shall use it only in - * accordance with the terms of the license agreement you entered into - * with Sun. - * - * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF - * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED - * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR - * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR - * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. - * - */ - -package javasoft.sqe.tests.api.javax.activation.TestClasses; - -import java.awt.datatransfer.*; -import java.io.*; -import java.io.IOException; -import javax.activation.*; - -/** Test DCH that does nothing. Just provides an object - */ - -public class TestDCH implements DataContentHandler { - - private DataFlavor df = null; - private static Object obj = null; - - public static String getDefaultMimeType() { - return "test/test"; - } - - public static String getDataFlavorName() { - return "madeInTestDCH"; - } - - public static Object getObject() - { - if (obj == null) - obj = new TestCommandObject(); - - return obj; - } - - public TestDCH(String mimeType) - { - this.df = new DataFlavor(mimeType, getDataFlavorName()); - } - - public TestDCH() - { - this(getDefaultMimeType()); - } - - public DataFlavor[] getTransferDataFlavors() - { - DataFlavor dfs [] = new DataFlavor[1]; - dfs[0] = df; - return dfs; - } - - public Object getTransferData(DataFlavor df, DataSource ds) throws UnsupportedFlavorException, IOException { - if (!this.df.isMimeTypeEqual(df.getMimeType())) - throw new UnsupportedFlavorException(df); - - return getObject(); - } - /** - * Return an object representing the data in its most preferred form. - * Generally this will be the form described by the first DataFlavor - * returned by the getTransferDataFlavors method. - */ - - public Object getContent(DataSource ds) throws IOException - { - return obj; - } - /** - * Convert the object to a byte stream of the specified MIME type - * and write it to the output stream. - */ - - public void writeTo(Object obj, String mimeType, OutputStream os ) throws IOException { - // tests not counting on this doing anything for now. - } - // methods of TestDCH (testing convenience) - - public String getMimeType() - { - return df.getMimeType(); - } -}
diff --git a/src/share/classes/javasoft/sqe/api/javax/activation/util/TestDCHFactory.java b/src/share/classes/javasoft/sqe/api/javax/activation/util/TestDCHFactory.java deleted file mode 100644 index 054c439..0000000 --- a/src/share/classes/javasoft/sqe/api/javax/activation/util/TestDCHFactory.java +++ /dev/null
@@ -1,48 +0,0 @@ -/* @(#)TestDCHFactory.java 1.1 98/02/09 - * - * Copyright (c) 1997-1998 Sun Microsystems, Inc. All Rights Reserved. - * This software is the confidential and proprietary information of Sun - * Microsystems, Inc. ("Confidential Information"). You shall not - * disclose such Confidential Information and shall use it only in - * accordance with the terms of the license agreement you entered into - * with Sun. - * - * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF - * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED - * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR - * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR - * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. - * - */ - -package javasoft.sqe.tests.api.javax.activation.TestClasses; - -import javax.activation.*; - -/** Test uitlity used by DataHandler class. - */ - -public class TestDCHFactory implements DataContentHandlerFactory -{ - private String mimeType = null; - - public TestDCHFactory() { - } - - public TestDCHFactory(String mimeType) - { - this.mimeType = mimeType; - } - // We allow the factory to make a distinctive TestDCH based upon an optional - // mimeType constructor argument, to allow tests to prove that - // DataHandler.setDataContentHandlerFactory overrides the affect setCommandMap. - - public DataContentHandler createDataContentHandler(String mimeType) - { - if (this.mimeType != null) - return new TestDCH(this.mimeType); - else - return new TestDCH(mimeType); - } -}
diff --git a/src/share/classes/javasoft/sqe/api/javax/activation/util/TestDataSource.java b/src/share/classes/javasoft/sqe/api/javax/activation/util/TestDataSource.java deleted file mode 100644 index 7f1490b..0000000 --- a/src/share/classes/javasoft/sqe/api/javax/activation/util/TestDataSource.java +++ /dev/null
@@ -1,50 +0,0 @@ -/* @(#)TestDataSource.java 1.1 98/02/09 - * - * Copyright (c) 1997-1998 Sun Microsystems, Inc. All Rights Reserved. - * This software is the confidential and proprietary information of Sun - * Microsystems, Inc. ("Confidential Information"). You shall not - * disclose such Confidential Information and shall use it only in - * accordance with the terms of the license agreement you entered into - * with Sun. - * - * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF - * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED - * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR - * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR - * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. - */ - -package javasoft.sqe.tests.api.javax.activation.TestClasses; - -import javax.activation.*; -import java.io.*; - -/** - * A TestDataSource for the DataHandler tests. It will return a - * the passed in byte stream via the getinputstream method. - */ - -public class TestDataSource implements DataSource { - - byte byte_array[] = null; - - public TestDataSource(byte byte_array[]){ - this.byte_array = byte_array; - } - - public InputStream getInputStream() throws IOException { - ByteArrayInputStream bis = new ByteArrayInputStream(byte_array); - return bis; - - } - public OutputStream getOutputStream() throws IOException { - return null; - } - public String getContentType(){ - return "application/octet-stream"; - } - public String getName() { - return "name"; - } -}
diff --git a/src/share/classes/javasoft/sqe/api/javax/activation/util/TestFileTypeMap.java b/src/share/classes/javasoft/sqe/api/javax/activation/util/TestFileTypeMap.java deleted file mode 100644 index 37e0142..0000000 --- a/src/share/classes/javasoft/sqe/api/javax/activation/util/TestFileTypeMap.java +++ /dev/null
@@ -1,40 +0,0 @@ -/* @(#)TestFileTypeMap.java 1.1 98/02/09 - * - * Copyright (c) 1997-1998 Sun Microsystems, Inc. All Rights Reserved. - * This software is the confidential and proprietary information of Sun - * Microsystems, Inc. ("Confidential Information"). You shall not - * disclose such Confidential Information and shall use it only in - * accordance with the terms of the license agreement you entered into - * with Sun. - * - * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF - * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED - * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR - * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR - * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. - * - */ - -package javasoft.sqe.tests.api.javax.activation.TestClasses; - -import java.io.*; -import javax.activation.*; - -/** Test utility library used by FileTypeMap tests. - */ - -public class TestFileTypeMap extends FileTypeMap -{ - public static String getTestType(){ - return "test/test"; - } - - public String getContentType(File f) { - return getTestType(); - } - - public String getContentType(String filename){ - return getTestType(); - } -}