harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r443539 [17/29] - in /incubator/harmony/enhanced/classlib/trunk/modules/security: ./ .settings/ META-INF/ make/ src/main/java/common/java/security/ src/main/java/common/java/security/acl/ src/main/java/common/java/security/cert/ src/main/ja...
Date Fri, 15 Sep 2006 01:18:16 GMT
Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertStoreExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertStoreExceptionTest.java?view=diff&rev=443539&r1=443538&r2=443539
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertStoreExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertStoreExceptionTest.java Thu Sep 14 18:17:39 2006
@@ -1,238 +1,238 @@
-/*
- *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
-package org.apache.harmony.security.tests.java.security.cert;
-
-import java.security.cert.CertStoreException;
-
-import junit.framework.TestCase;
-
-/**
- * Tests for <code>CertStoreException</code> class constructors and methods.
- * 
- */
-public class CertStoreExceptionTest extends TestCase {
-
-    public static void main(String[] args) {
-    }
-
-    /**
-     * Constructor for CertStoreExceptionTests.
-     * 
-     * @param arg0
-     */
-    public CertStoreExceptionTest(String arg0) {
-        super(arg0);
-    }
-
-    private static String[] msgs = {
-            "",
-            "Check new message",
-            "Check new message Check new message Check new message Check new message Check new message" };
-
-    private static Throwable tCause = new Throwable("Throwable for exception");
-
-    static String createErr(Exception tE, Exception eE) {
-        return "CertStoreException: ".concat(tE.toString()).concat(
-                " is not equal to caught exception: ").concat(eE.toString());
-    }
-
-    /**
-     * Test for <code>CertStoreException()</code> constructor Assertion:
-     * constructs CertStoreException with no detail message
-     */
-    public void testCertStoreException01() {
-        CertStoreException tE = new CertStoreException();
-        assertNull("getMessage() must return null.", tE.getMessage());
-        assertNull("getCause() must return null", tE.getCause());
-        try {
-            throw tE;
-        } catch (Exception e) {
-            assertTrue(createErr(tE, e), tE.equals(e));
-        }
-    }
-
-    /**
-     * Test for <code>CertStoreException(String)</code> constructor Assertion:
-     * constructs CertStoreException with detail message msg. Parameter
-     * <code>msg</code> is not null.
-     */
-    public void testCertStoreException02() {
-        CertStoreException tE;
-        for (int i = 0; i < msgs.length; i++) {
-            tE = new CertStoreException(msgs[i]);
-            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
-                    .getMessage(), msgs[i]);
-            assertNull("getCause() must return null", tE.getCause());
-            try {
-                throw tE;
-            } catch (Exception e) {
-                assertTrue(createErr(tE, e), tE.equals(e));
-            }
-        }
-    }
-
-    /**
-     * Test for <code>CertStoreException(String)</code> constructor Assertion:
-     * constructs CertStoreException when <code>msg</code> is null
-     */
-    public void testCertStoreException03() {
-        String msg = null;
-        CertStoreException tE = new CertStoreException(msg);
-        assertNull("getMessage() must return null.", tE.getMessage());
-        assertNull("getCause() must return null", tE.getCause());
-        try {
-            throw tE;
-        } catch (Exception e) {
-            assertTrue(createErr(tE, e), tE.equals(e));
-        }
-    }
-
-    /**
-     * Test for <code>CertStoreException(Throwable)</code> constructor
-     * Assertion: constructs CertStoreException when <code>cause</code> is
-     * null
-     */
-    public void testCertStoreException04() {
-        Throwable cause = null;
-        CertStoreException tE = new CertStoreException(cause);
-        assertNull("getMessage() must return null.", tE.getMessage());
-        assertNull("getCause() must return null", tE.getCause());
-        try {
-            throw tE;
-        } catch (Exception e) {
-            assertTrue(createErr(tE, e), tE.equals(e));
-        }
-    }
-
-    /**
-     * Test for <code>CertStoreException(Throwable)</code> constructor
-     * Assertion: constructs CertStoreException when <code>cause</code> is not
-     * null
-     */
-    public void testCertStoreException05() {
-        CertStoreException tE = new CertStoreException(tCause);
-        if (tE.getMessage() != null) {
-            String toS = tCause.toString();
-            String getM = tE.getMessage();
-            assertTrue("getMessage() should contain ".concat(toS), (getM
-                    .indexOf(toS) != -1));
-        }
-        assertNotNull("getCause() must not return null", tE.getCause());
-        assertEquals("getCause() must return ".concat(tCause.toString()), tE
-                .getCause(), tCause);
-        try {
-            throw tE;
-        } catch (Exception e) {
-            assertTrue(createErr(tE, e), tE.equals(e));
-        }
-    }
-
-    /**
-     * Test for <code>CertStoreException(String, Throwable)</code> constructor
-     * Assertion: constructs CertStoreException when <code>cause</code> is
-     * null <code>msg</code> is null
-     */
-    public void testCertStoreException06() {
-        CertStoreException tE = new CertStoreException(null, null);
-        assertNull("getMessage() must return null", tE.getMessage());
-        assertNull("getCause() must return null", tE.getCause());
-        try {
-            throw tE;
-        } catch (Exception e) {
-            assertTrue(createErr(tE, e), tE.equals(e));
-        }
-    }
-
-    /**
-     * Test for <code>CertStoreException(String, Throwable)</code> constructor
-     * Assertion: constructs CertStoreException when <code>cause</code> is
-     * null <code>msg</code> is not null
-     */
-    public void testCertStoreException07() {
-        CertStoreException tE;
-        for (int i = 0; i < msgs.length; i++) {
-            tE = new CertStoreException(msgs[i], null);
-            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
-                    .getMessage(), msgs[i]);
-            assertNull("getCause() must return null", tE.getCause());
-            try {
-                throw tE;
-            } catch (Exception e) {
-                assertTrue(createErr(tE, e), tE.equals(e));
-            }
-        }
-    }
-
-    /**
-     * Test for <code>CertStoreException(String, Throwable)</code> constructor
-     * Assertion: constructs CertStoreException when <code>cause</code> is not
-     * null <code>msg</code> is null
-     */
-    public void testCertStoreException08() {
-        CertStoreException tE = new CertStoreException(null, tCause);
-        if (tE.getMessage() != null) {
-            String toS = tCause.toString();
-            String getM = tE.getMessage();
-            assertTrue("getMessage() must should ".concat(toS), (getM
-                    .indexOf(toS) != -1));
-        }
-        assertNotNull("getCause() must not return null", tE.getCause());
-        assertEquals("getCause() must return ".concat(tCause.toString()), tE
-                .getCause(), tCause);
-        try {
-            throw tE;
-        } catch (Exception e) {
-            assertTrue(createErr(tE, e), tE.equals(e));
-        }
-    }
-
-    /**
-     * Test for <code>CertStoreException(String, Throwable)</code> constructor
-     * Assertion: constructs CertStoreException when <code>cause</code> is not
-     * null <code>msg</code> is not null
-     */
-    public void testCertStoreException09() {
-        CertStoreException tE;
-        for (int i = 0; i < msgs.length; i++) {
-            tE = new CertStoreException(msgs[i], tCause);
-            String getM = tE.getMessage();
-            String toS = tCause.toString();
-            if (msgs[i].length() > 0) {
-                assertTrue("getMessage() must contain ".concat(msgs[i]), getM
-                        .indexOf(msgs[i]) != -1);
-                if (!getM.equals(msgs[i])) {
-                    assertTrue("getMessage() should contain ".concat(toS), getM
-                            .indexOf(toS) != -1);
-                }
-            }
-            assertNotNull("getCause() must not return null", tE.getCause());
-            assertEquals("getCause() must return ".concat(tCause.toString()),
-                    tE.getCause(), tCause);
-
-            try {
-                throw tE;
-            } catch (Exception e) {
-                assertTrue(createErr(tE, e), tE.equals(e));
-            }
-        }
-    }
-}
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+* @author Vera Y. Petrashkova
+* @version $Revision$
+*/
+
+package org.apache.harmony.security.tests.java.security.cert;
+
+import java.security.cert.CertStoreException;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests for <code>CertStoreException</code> class constructors and methods.
+ * 
+ */
+public class CertStoreExceptionTest extends TestCase {
+
+    public static void main(String[] args) {
+    }
+
+    /**
+     * Constructor for CertStoreExceptionTests.
+     * 
+     * @param arg0
+     */
+    public CertStoreExceptionTest(String arg0) {
+        super(arg0);
+    }
+
+    private static String[] msgs = {
+            "",
+            "Check new message",
+            "Check new message Check new message Check new message Check new message Check new message" };
+
+    private static Throwable tCause = new Throwable("Throwable for exception");
+
+    static String createErr(Exception tE, Exception eE) {
+        return "CertStoreException: ".concat(tE.toString()).concat(
+                " is not equal to caught exception: ").concat(eE.toString());
+    }
+
+    /**
+     * Test for <code>CertStoreException()</code> constructor Assertion:
+     * constructs CertStoreException with no detail message
+     */
+    public void testCertStoreException01() {
+        CertStoreException tE = new CertStoreException();
+        assertNull("getMessage() must return null.", tE.getMessage());
+        assertNull("getCause() must return null", tE.getCause());
+        try {
+            throw tE;
+        } catch (Exception e) {
+            assertTrue(createErr(tE, e), tE.equals(e));
+        }
+    }
+
+    /**
+     * Test for <code>CertStoreException(String)</code> constructor Assertion:
+     * constructs CertStoreException with detail message msg. Parameter
+     * <code>msg</code> is not null.
+     */
+    public void testCertStoreException02() {
+        CertStoreException tE;
+        for (int i = 0; i < msgs.length; i++) {
+            tE = new CertStoreException(msgs[i]);
+            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
+                    .getMessage(), msgs[i]);
+            assertNull("getCause() must return null", tE.getCause());
+            try {
+                throw tE;
+            } catch (Exception e) {
+                assertTrue(createErr(tE, e), tE.equals(e));
+            }
+        }
+    }
+
+    /**
+     * Test for <code>CertStoreException(String)</code> constructor Assertion:
+     * constructs CertStoreException when <code>msg</code> is null
+     */
+    public void testCertStoreException03() {
+        String msg = null;
+        CertStoreException tE = new CertStoreException(msg);
+        assertNull("getMessage() must return null.", tE.getMessage());
+        assertNull("getCause() must return null", tE.getCause());
+        try {
+            throw tE;
+        } catch (Exception e) {
+            assertTrue(createErr(tE, e), tE.equals(e));
+        }
+    }
+
+    /**
+     * Test for <code>CertStoreException(Throwable)</code> constructor
+     * Assertion: constructs CertStoreException when <code>cause</code> is
+     * null
+     */
+    public void testCertStoreException04() {
+        Throwable cause = null;
+        CertStoreException tE = new CertStoreException(cause);
+        assertNull("getMessage() must return null.", tE.getMessage());
+        assertNull("getCause() must return null", tE.getCause());
+        try {
+            throw tE;
+        } catch (Exception e) {
+            assertTrue(createErr(tE, e), tE.equals(e));
+        }
+    }
+
+    /**
+     * Test for <code>CertStoreException(Throwable)</code> constructor
+     * Assertion: constructs CertStoreException when <code>cause</code> is not
+     * null
+     */
+    public void testCertStoreException05() {
+        CertStoreException tE = new CertStoreException(tCause);
+        if (tE.getMessage() != null) {
+            String toS = tCause.toString();
+            String getM = tE.getMessage();
+            assertTrue("getMessage() should contain ".concat(toS), (getM
+                    .indexOf(toS) != -1));
+        }
+        assertNotNull("getCause() must not return null", tE.getCause());
+        assertEquals("getCause() must return ".concat(tCause.toString()), tE
+                .getCause(), tCause);
+        try {
+            throw tE;
+        } catch (Exception e) {
+            assertTrue(createErr(tE, e), tE.equals(e));
+        }
+    }
+
+    /**
+     * Test for <code>CertStoreException(String, Throwable)</code> constructor
+     * Assertion: constructs CertStoreException when <code>cause</code> is
+     * null <code>msg</code> is null
+     */
+    public void testCertStoreException06() {
+        CertStoreException tE = new CertStoreException(null, null);
+        assertNull("getMessage() must return null", tE.getMessage());
+        assertNull("getCause() must return null", tE.getCause());
+        try {
+            throw tE;
+        } catch (Exception e) {
+            assertTrue(createErr(tE, e), tE.equals(e));
+        }
+    }
+
+    /**
+     * Test for <code>CertStoreException(String, Throwable)</code> constructor
+     * Assertion: constructs CertStoreException when <code>cause</code> is
+     * null <code>msg</code> is not null
+     */
+    public void testCertStoreException07() {
+        CertStoreException tE;
+        for (int i = 0; i < msgs.length; i++) {
+            tE = new CertStoreException(msgs[i], null);
+            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
+                    .getMessage(), msgs[i]);
+            assertNull("getCause() must return null", tE.getCause());
+            try {
+                throw tE;
+            } catch (Exception e) {
+                assertTrue(createErr(tE, e), tE.equals(e));
+            }
+        }
+    }
+
+    /**
+     * Test for <code>CertStoreException(String, Throwable)</code> constructor
+     * Assertion: constructs CertStoreException when <code>cause</code> is not
+     * null <code>msg</code> is null
+     */
+    public void testCertStoreException08() {
+        CertStoreException tE = new CertStoreException(null, tCause);
+        if (tE.getMessage() != null) {
+            String toS = tCause.toString();
+            String getM = tE.getMessage();
+            assertTrue("getMessage() must should ".concat(toS), (getM
+                    .indexOf(toS) != -1));
+        }
+        assertNotNull("getCause() must not return null", tE.getCause());
+        assertEquals("getCause() must return ".concat(tCause.toString()), tE
+                .getCause(), tCause);
+        try {
+            throw tE;
+        } catch (Exception e) {
+            assertTrue(createErr(tE, e), tE.equals(e));
+        }
+    }
+
+    /**
+     * Test for <code>CertStoreException(String, Throwable)</code> constructor
+     * Assertion: constructs CertStoreException when <code>cause</code> is not
+     * null <code>msg</code> is not null
+     */
+    public void testCertStoreException09() {
+        CertStoreException tE;
+        for (int i = 0; i < msgs.length; i++) {
+            tE = new CertStoreException(msgs[i], tCause);
+            String getM = tE.getMessage();
+            String toS = tCause.toString();
+            if (msgs[i].length() > 0) {
+                assertTrue("getMessage() must contain ".concat(msgs[i]), getM
+                        .indexOf(msgs[i]) != -1);
+                if (!getM.equals(msgs[i])) {
+                    assertTrue("getMessage() should contain ".concat(toS), getM
+                            .indexOf(toS) != -1);
+                }
+            }
+            assertNotNull("getCause() must not return null", tE.getCause());
+            assertEquals("getCause() must return ".concat(tCause.toString()),
+                    tE.getCause(), tCause);
+
+            try {
+                throw tE;
+            } catch (Exception e) {
+                assertTrue(createErr(tE, e), tE.equals(e));
+            }
+        }
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertStoreExceptionTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertStoreSpiTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertStoreSpiTest.java?view=diff&rev=443539&r1=443538&r2=443539
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertStoreSpiTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertStoreSpiTest.java Thu Sep 14 18:17:39 2006
@@ -1,106 +1,106 @@
-/*
- *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
-package org.apache.harmony.security.tests.java.security.cert;
-
-
-import java.security.InvalidAlgorithmParameterException;
-import java.security.cert.CRL;
-import java.security.cert.CRLSelector;
-import java.security.cert.CertSelector;
-import java.security.cert.CertStoreException;
-import java.security.cert.CertStoreSpi;
-import java.security.cert.Certificate;
-
-import org.apache.harmony.security.tests.support.cert.MyCertStoreSpi;
-import org.apache.harmony.security.tests.support.cert.MyCertStoreParameters;
-
-import junit.framework.TestCase;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-/**
- * Tests for <code>CertStoreSpi</code> class constructors and methods.
- * 
- */
-
-public class CertStoreSpiTest extends TestCase {
-
-    /**
-     * Constructor for CertStoreSpiTest.
-     * 
-     * @param arg0
-     */
-    public CertStoreSpiTest(String arg0) {
-        super(arg0);
-    }
-
-    /**
-     * Test for <code>CertStoreSpi</code> constructor Assertion: constructs
-     * CertStoreSpi
-     */
-    public void testCertStoreSpi01() throws InvalidAlgorithmParameterException,
-            CertStoreException {
-        CertStoreSpi certStoreSpi = null;
-        CertSelector certSelector = new tmpCertSelector();//new
-                                                          // X509CertSelector();
-        CRLSelector crlSelector = new tmpCRLSelector();//new X509CRLSelector();
-        try {
-            certStoreSpi = new MyCertStoreSpi(null);
-            fail("InvalidAlgorithmParameterException must be thrown");
-        } catch (InvalidAlgorithmParameterException e) {
-        }
-        certStoreSpi = new MyCertStoreSpi(new MyCertStoreParameters());
-        assertNull("Not null collection", certStoreSpi
-                .engineGetCertificates(certSelector));
-        assertNull("Not null collection", certStoreSpi
-                .engineGetCRLs(crlSelector));
-    }
-    
-    public static Test suite() {
-        return new TestSuite(CertStoreSpiTest.class);
-    }
-
-    public static void main(String args[]) {
-        junit.textui.TestRunner.run(suite());
-    }
-    
-    /** 
-     * Additional classes for verification CertStoreSpi class
-     */
-    public static class tmpCRLSelector implements CRLSelector {
-        public Object clone() {
-            return null;
-        }
-        public boolean match (CRL crl) {
-            return false;
-        }
-    }
-    public static class tmpCertSelector implements CertSelector {
-        public Object clone() {
-            return null;
-        }
-        public boolean match (Certificate crl) {
-            return true;
-        }
-    }
-    
-}
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+* @author Vera Y. Petrashkova
+* @version $Revision$
+*/
+
+package org.apache.harmony.security.tests.java.security.cert;
+
+
+import java.security.InvalidAlgorithmParameterException;
+import java.security.cert.CRL;
+import java.security.cert.CRLSelector;
+import java.security.cert.CertSelector;
+import java.security.cert.CertStoreException;
+import java.security.cert.CertStoreSpi;
+import java.security.cert.Certificate;
+
+import org.apache.harmony.security.tests.support.cert.MyCertStoreSpi;
+import org.apache.harmony.security.tests.support.cert.MyCertStoreParameters;
+
+import junit.framework.TestCase;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * Tests for <code>CertStoreSpi</code> class constructors and methods.
+ * 
+ */
+
+public class CertStoreSpiTest extends TestCase {
+
+    /**
+     * Constructor for CertStoreSpiTest.
+     * 
+     * @param arg0
+     */
+    public CertStoreSpiTest(String arg0) {
+        super(arg0);
+    }
+
+    /**
+     * Test for <code>CertStoreSpi</code> constructor Assertion: constructs
+     * CertStoreSpi
+     */
+    public void testCertStoreSpi01() throws InvalidAlgorithmParameterException,
+            CertStoreException {
+        CertStoreSpi certStoreSpi = null;
+        CertSelector certSelector = new tmpCertSelector();//new
+                                                          // X509CertSelector();
+        CRLSelector crlSelector = new tmpCRLSelector();//new X509CRLSelector();
+        try {
+            certStoreSpi = new MyCertStoreSpi(null);
+            fail("InvalidAlgorithmParameterException must be thrown");
+        } catch (InvalidAlgorithmParameterException e) {
+        }
+        certStoreSpi = new MyCertStoreSpi(new MyCertStoreParameters());
+        assertNull("Not null collection", certStoreSpi
+                .engineGetCertificates(certSelector));
+        assertNull("Not null collection", certStoreSpi
+                .engineGetCRLs(crlSelector));
+    }
+    
+    public static Test suite() {
+        return new TestSuite(CertStoreSpiTest.class);
+    }
+
+    public static void main(String args[]) {
+        junit.textui.TestRunner.run(suite());
+    }
+    
+    /** 
+     * Additional classes for verification CertStoreSpi class
+     */
+    public static class tmpCRLSelector implements CRLSelector {
+        public Object clone() {
+            return null;
+        }
+        public boolean match (CRL crl) {
+            return false;
+        }
+    }
+    public static class tmpCertSelector implements CertSelector {
+        public Object clone() {
+            return null;
+        }
+        public boolean match (Certificate crl) {
+            return true;
+        }
+    }
+    
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertStoreSpiTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateEncodingException2Test.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateEncodingException2Test.java?view=diff&rev=443539&r1=443538&r2=443539
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateEncodingException2Test.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateEncodingException2Test.java Thu Sep 14 18:17:39 2006
@@ -1,42 +1,42 @@
-/* Copyright 2005 The Apache Software Foundation or its licensors, as applicable
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.harmony.security.tests.java.security.cert;
-
-import java.security.cert.CertificateEncodingException;
-
-import junit.framework.TestCase;
-
-public class CertificateEncodingException2Test extends junit.framework.TestCase {
-
-	/**
-	 * @tests java.security.cert.CertificateEncodingException#CertificateEncodingException()
-	 */
-	public void test_Constructor() {
-		// Test for method java.security.cert.CertificateEncodingException()
-		try {
-			if (true) {
-				throw new CertificateEncodingException();
-			}
-			fail("Should have thrown CertificateEncodingException");
-		} catch (CertificateEncodingException e) {
-			assertEquals("Initializer failed : " + e.toString(),
-					"java.security.cert.CertificateEncodingException",
-					e.toString());
-		} catch (Exception e) {
-			fail("Unexpected exception during test : " + e);
-		}
-	}
+/* Copyright 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.harmony.security.tests.java.security.cert;
+
+import java.security.cert.CertificateEncodingException;
+
+import junit.framework.TestCase;
+
+public class CertificateEncodingException2Test extends junit.framework.TestCase {
+
+	/**
+	 * @tests java.security.cert.CertificateEncodingException#CertificateEncodingException()
+	 */
+	public void test_Constructor() {
+		// Test for method java.security.cert.CertificateEncodingException()
+		try {
+			if (true) {
+				throw new CertificateEncodingException();
+			}
+			fail("Should have thrown CertificateEncodingException");
+		} catch (CertificateEncodingException e) {
+			assertEquals("Initializer failed : " + e.toString(),
+					"java.security.cert.CertificateEncodingException",
+					e.toString());
+		} catch (Exception e) {
+			fail("Unexpected exception during test : " + e);
+		}
+	}
 }

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateEncodingException2Test.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateEncodingExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateEncodingExceptionTest.java?view=diff&rev=443539&r1=443538&r2=443539
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateEncodingExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateEncodingExceptionTest.java Thu Sep 14 18:17:39 2006
@@ -1,245 +1,245 @@
-/*
- *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
-package org.apache.harmony.security.tests.java.security.cert;
-
-import java.security.cert.CertificateEncodingException;
-
-import junit.framework.TestCase;
-
-
-/**
- * Tests for <code>CertificateEncodingException</code> class constructors and
- * methods.
- * 
- */
-public class CertificateEncodingExceptionTest extends TestCase {
-
-    public static void main(String[] args) {
-    }
-
-    /**
-     * Constructor for CertificateEncodingExceptionTests.
-     * 
-     * @param arg0
-     */
-    public CertificateEncodingExceptionTest(String arg0) {
-        super(arg0);
-    }
-
-    private static String[] msgs = {
-            "",
-            "Check new message",
-            "Check new message Check new message Check new message Check new message Check new message" };
-
-    private static Throwable tCause = new Throwable("Throwable for exception");
-
-    static String createErr(Exception tE, Exception eE) {
-        return "CertificateEncodingException: ".concat(tE.toString()).concat(
-                " is not equal to caught exception: ").concat(eE.toString());
-    }
-
-    /**
-     * Test for <code>CertificateEncodingException()</code> constructor
-     * Assertion: constructs CertificateEncodingException with no detail message
-     */
-    public void testCertificateEncodingException01() {
-        CertificateEncodingException tE = new CertificateEncodingException();
-        assertNull("getMessage() must return null.", tE.getMessage());
-        assertNull("getCause() must return null", tE.getCause());
-        try {
-            throw tE;
-        } catch (Exception e) {
-            assertTrue(createErr(tE, e), tE.equals(e));
-        }
-    }
-
-    /**
-     * Test for <code>CertificateEncodingException(String)</code> constructor
-     * Assertion: constructs CertificateEncodingException with detail message
-     * msg. Parameter <code>msg</code> is not null.
-     */
-    public void testCertificateEncodingException02() {
-        CertificateEncodingException tE;
-        for (int i = 0; i < msgs.length; i++) {
-            tE = new CertificateEncodingException(msgs[i]);
-            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
-                    .getMessage(), msgs[i]);
-            assertNull("getCause() must return null", tE.getCause());
-            try {
-                throw tE;
-            } catch (Exception e) {
-                assertTrue(createErr(tE, e), tE.equals(e));
-            }
-        }
-    }
-
-    /**
-     * Test for <code>CertificateEncodingException(String)</code> constructor
-     * Assertion: constructs CertificateEncodingException when <code>msg</code>
-     * is null
-     */
-    public void testCertificateEncodingException03() {
-        String msg = null;
-        CertificateEncodingException tE = new CertificateEncodingException(msg);
-        assertNull("getMessage() must return null.", tE.getMessage());
-        assertNull("getCause() must return null", tE.getCause());
-        try {
-            throw tE;
-        } catch (Exception e) {
-            assertTrue(createErr(tE, e), tE.equals(e));
-        }
-    }
-
-    /**
-     * Test for <code>CertificateEncodingException(Throwable)</code>
-     * constructor Assertion: constructs CertificateEncodingException when
-     * <code>cause</code> is null
-     */
-    public void testCertificateEncodingException04() {
-        Throwable cause = null;
-        CertificateEncodingException tE = new CertificateEncodingException(
-                cause);
-        assertNull("getMessage() must return null.", tE.getMessage());
-        assertNull("getCause() must return null", tE.getCause());
-        try {
-            throw tE;
-        } catch (Exception e) {
-            assertTrue(createErr(tE, e), tE.equals(e));
-        }
-    }
-
-    /**
-     * Test for <code>CertificateEncodingException(Throwable)</code>
-     * constructor Assertion: constructs CertificateEncodingException when
-     * <code>cause</code> is not null
-     */
-    public void testCertificateEncodingException05() {
-        CertificateEncodingException tE = new CertificateEncodingException(
-                tCause);
-        if (tE.getMessage() != null) {
-            String toS = tCause.toString();
-            String getM = tE.getMessage();
-            assertTrue("getMessage() should contain ".concat(toS), (getM
-                    .indexOf(toS) != -1));
-        }
-        assertNotNull("getCause() must not return null", tE.getCause());
-        assertEquals("getCause() must return ".concat(tCause.toString()), tE
-                .getCause(), tCause);
-        try {
-            throw tE;
-        } catch (Exception e) {
-            assertTrue(createErr(tE, e), tE.equals(e));
-        }
-    }
-
-    /**
-     * Test for <code>CertificateEncodingException(String, Throwable)</code>
-     * constructor Assertion: constructs CertificateEncodingException when
-     * <code>cause</code> is null <code>msg</code> is null
-     */
-    public void testCertificateEncodingException06() {
-        CertificateEncodingException tE = new CertificateEncodingException(
-                null, null);
-        assertNull("getMessage() must return null", tE.getMessage());
-        assertNull("getCause() must return null", tE.getCause());
-        try {
-            throw tE;
-        } catch (Exception e) {
-            assertTrue(createErr(tE, e), tE.equals(e));
-        }
-    }
-
-    /**
-     * Test for <code>CertificateEncodingException(String, Throwable)</code>
-     * constructor Assertion: constructs CertificateEncodingException when
-     * <code>cause</code> is null <code>msg</code> is not null
-     */
-    public void testCertificateEncodingException07() {
-        CertificateEncodingException tE;
-        for (int i = 0; i < msgs.length; i++) {
-            tE = new CertificateEncodingException(msgs[i], null);
-            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
-                    .getMessage(), msgs[i]);
-            assertNull("getCause() must return null", tE.getCause());
-            try {
-                throw tE;
-            } catch (Exception e) {
-                assertTrue(createErr(tE, e), tE.equals(e));
-            }
-        }
-    }
-
-    /**
-     * Test for <code>CertificateEncodingException(String, Throwable)</code>
-     * constructor Assertion: constructs CertificateEncodingException when
-     * <code>cause</code> is not null <code>msg</code> is null
-     */
-    public void testCertificateEncodingException08() {
-        CertificateEncodingException tE = new CertificateEncodingException(
-                null, tCause);
-        if (tE.getMessage() != null) {
-            String toS = tCause.toString();
-            String getM = tE.getMessage();
-            assertTrue("getMessage() must should ".concat(toS), (getM
-                    .indexOf(toS) != -1));
-        }
-        assertNotNull("getCause() must not return null", tE.getCause());
-        assertEquals("getCause() must return ".concat(tCause.toString()), tE
-                .getCause(), tCause);
-        try {
-            throw tE;
-        } catch (Exception e) {
-            assertTrue(createErr(tE, e), tE.equals(e));
-        }
-    }
-
-    /**
-     * Test for <code>CertificateEncodingException(String, Throwable)</code>
-     * constructor Assertion: constructs CertificateEncodingException when
-     * <code>cause</code> is not null <code>msg</code> is not null
-     */
-    public void testCertificateEncodingException09() {
-        CertificateEncodingException tE;
-        for (int i = 0; i < msgs.length; i++) {
-            tE = new CertificateEncodingException(msgs[i], tCause);
-            String getM = tE.getMessage();
-            String toS = tCause.toString();
-            if (msgs[i].length() > 0) {
-                assertTrue("getMessage() must contain ".concat(msgs[i]), getM
-                        .indexOf(msgs[i]) != -1);
-                if (!getM.equals(msgs[i])) {
-                    assertTrue("getMessage() should contain ".concat(toS), getM
-                            .indexOf(toS) != -1);
-                }
-            }
-            assertNotNull("getCause() must not return null", tE.getCause());
-            assertEquals("getCause() must return ".concat(tCause.toString()),
-                    tE.getCause(), tCause);
-
-            try {
-                throw tE;
-            } catch (Exception e) {
-                assertTrue(createErr(tE, e), tE.equals(e));
-            }
-        }
-    }
-}
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+* @author Vera Y. Petrashkova
+* @version $Revision$
+*/
+
+package org.apache.harmony.security.tests.java.security.cert;
+
+import java.security.cert.CertificateEncodingException;
+
+import junit.framework.TestCase;
+
+
+/**
+ * Tests for <code>CertificateEncodingException</code> class constructors and
+ * methods.
+ * 
+ */
+public class CertificateEncodingExceptionTest extends TestCase {
+
+    public static void main(String[] args) {
+    }
+
+    /**
+     * Constructor for CertificateEncodingExceptionTests.
+     * 
+     * @param arg0
+     */
+    public CertificateEncodingExceptionTest(String arg0) {
+        super(arg0);
+    }
+
+    private static String[] msgs = {
+            "",
+            "Check new message",
+            "Check new message Check new message Check new message Check new message Check new message" };
+
+    private static Throwable tCause = new Throwable("Throwable for exception");
+
+    static String createErr(Exception tE, Exception eE) {
+        return "CertificateEncodingException: ".concat(tE.toString()).concat(
+                " is not equal to caught exception: ").concat(eE.toString());
+    }
+
+    /**
+     * Test for <code>CertificateEncodingException()</code> constructor
+     * Assertion: constructs CertificateEncodingException with no detail message
+     */
+    public void testCertificateEncodingException01() {
+        CertificateEncodingException tE = new CertificateEncodingException();
+        assertNull("getMessage() must return null.", tE.getMessage());
+        assertNull("getCause() must return null", tE.getCause());
+        try {
+            throw tE;
+        } catch (Exception e) {
+            assertTrue(createErr(tE, e), tE.equals(e));
+        }
+    }
+
+    /**
+     * Test for <code>CertificateEncodingException(String)</code> constructor
+     * Assertion: constructs CertificateEncodingException with detail message
+     * msg. Parameter <code>msg</code> is not null.
+     */
+    public void testCertificateEncodingException02() {
+        CertificateEncodingException tE;
+        for (int i = 0; i < msgs.length; i++) {
+            tE = new CertificateEncodingException(msgs[i]);
+            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
+                    .getMessage(), msgs[i]);
+            assertNull("getCause() must return null", tE.getCause());
+            try {
+                throw tE;
+            } catch (Exception e) {
+                assertTrue(createErr(tE, e), tE.equals(e));
+            }
+        }
+    }
+
+    /**
+     * Test for <code>CertificateEncodingException(String)</code> constructor
+     * Assertion: constructs CertificateEncodingException when <code>msg</code>
+     * is null
+     */
+    public void testCertificateEncodingException03() {
+        String msg = null;
+        CertificateEncodingException tE = new CertificateEncodingException(msg);
+        assertNull("getMessage() must return null.", tE.getMessage());
+        assertNull("getCause() must return null", tE.getCause());
+        try {
+            throw tE;
+        } catch (Exception e) {
+            assertTrue(createErr(tE, e), tE.equals(e));
+        }
+    }
+
+    /**
+     * Test for <code>CertificateEncodingException(Throwable)</code>
+     * constructor Assertion: constructs CertificateEncodingException when
+     * <code>cause</code> is null
+     */
+    public void testCertificateEncodingException04() {
+        Throwable cause = null;
+        CertificateEncodingException tE = new CertificateEncodingException(
+                cause);
+        assertNull("getMessage() must return null.", tE.getMessage());
+        assertNull("getCause() must return null", tE.getCause());
+        try {
+            throw tE;
+        } catch (Exception e) {
+            assertTrue(createErr(tE, e), tE.equals(e));
+        }
+    }
+
+    /**
+     * Test for <code>CertificateEncodingException(Throwable)</code>
+     * constructor Assertion: constructs CertificateEncodingException when
+     * <code>cause</code> is not null
+     */
+    public void testCertificateEncodingException05() {
+        CertificateEncodingException tE = new CertificateEncodingException(
+                tCause);
+        if (tE.getMessage() != null) {
+            String toS = tCause.toString();
+            String getM = tE.getMessage();
+            assertTrue("getMessage() should contain ".concat(toS), (getM
+                    .indexOf(toS) != -1));
+        }
+        assertNotNull("getCause() must not return null", tE.getCause());
+        assertEquals("getCause() must return ".concat(tCause.toString()), tE
+                .getCause(), tCause);
+        try {
+            throw tE;
+        } catch (Exception e) {
+            assertTrue(createErr(tE, e), tE.equals(e));
+        }
+    }
+
+    /**
+     * Test for <code>CertificateEncodingException(String, Throwable)</code>
+     * constructor Assertion: constructs CertificateEncodingException when
+     * <code>cause</code> is null <code>msg</code> is null
+     */
+    public void testCertificateEncodingException06() {
+        CertificateEncodingException tE = new CertificateEncodingException(
+                null, null);
+        assertNull("getMessage() must return null", tE.getMessage());
+        assertNull("getCause() must return null", tE.getCause());
+        try {
+            throw tE;
+        } catch (Exception e) {
+            assertTrue(createErr(tE, e), tE.equals(e));
+        }
+    }
+
+    /**
+     * Test for <code>CertificateEncodingException(String, Throwable)</code>
+     * constructor Assertion: constructs CertificateEncodingException when
+     * <code>cause</code> is null <code>msg</code> is not null
+     */
+    public void testCertificateEncodingException07() {
+        CertificateEncodingException tE;
+        for (int i = 0; i < msgs.length; i++) {
+            tE = new CertificateEncodingException(msgs[i], null);
+            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
+                    .getMessage(), msgs[i]);
+            assertNull("getCause() must return null", tE.getCause());
+            try {
+                throw tE;
+            } catch (Exception e) {
+                assertTrue(createErr(tE, e), tE.equals(e));
+            }
+        }
+    }
+
+    /**
+     * Test for <code>CertificateEncodingException(String, Throwable)</code>
+     * constructor Assertion: constructs CertificateEncodingException when
+     * <code>cause</code> is not null <code>msg</code> is null
+     */
+    public void testCertificateEncodingException08() {
+        CertificateEncodingException tE = new CertificateEncodingException(
+                null, tCause);
+        if (tE.getMessage() != null) {
+            String toS = tCause.toString();
+            String getM = tE.getMessage();
+            assertTrue("getMessage() must should ".concat(toS), (getM
+                    .indexOf(toS) != -1));
+        }
+        assertNotNull("getCause() must not return null", tE.getCause());
+        assertEquals("getCause() must return ".concat(tCause.toString()), tE
+                .getCause(), tCause);
+        try {
+            throw tE;
+        } catch (Exception e) {
+            assertTrue(createErr(tE, e), tE.equals(e));
+        }
+    }
+
+    /**
+     * Test for <code>CertificateEncodingException(String, Throwable)</code>
+     * constructor Assertion: constructs CertificateEncodingException when
+     * <code>cause</code> is not null <code>msg</code> is not null
+     */
+    public void testCertificateEncodingException09() {
+        CertificateEncodingException tE;
+        for (int i = 0; i < msgs.length; i++) {
+            tE = new CertificateEncodingException(msgs[i], tCause);
+            String getM = tE.getMessage();
+            String toS = tCause.toString();
+            if (msgs[i].length() > 0) {
+                assertTrue("getMessage() must contain ".concat(msgs[i]), getM
+                        .indexOf(msgs[i]) != -1);
+                if (!getM.equals(msgs[i])) {
+                    assertTrue("getMessage() should contain ".concat(toS), getM
+                            .indexOf(toS) != -1);
+                }
+            }
+            assertNotNull("getCause() must not return null", tE.getCause());
+            assertEquals("getCause() must return ".concat(tCause.toString()),
+                    tE.getCause(), tCause);
+
+            try {
+                throw tE;
+            } catch (Exception e) {
+                assertTrue(createErr(tE, e), tE.equals(e));
+            }
+        }
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateEncodingExceptionTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateException2Test.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateException2Test.java?view=diff&rev=443539&r1=443538&r2=443539
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateException2Test.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateException2Test.java Thu Sep 14 18:17:39 2006
@@ -1,60 +1,60 @@
-/* Copyright 2005 The Apache Software Foundation or its licensors, as applicable
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.harmony.security.tests.java.security.cert;
-
-import java.security.cert.CertificateException;
-
-import junit.framework.TestCase;
-
-public class CertificateException2Test extends junit.framework.TestCase {
-
-	/**
-	 * @tests java.security.cert.CertificateException#CertificateException()
-	 */
-	public void test_Constructor() {
-		// Test for method java.security.cert.CertificateException()
-		try {
-			if (true) {
-				throw new CertificateException();
-			}
-			fail("Should have thrown CertificateException");
-		} catch (CertificateException e) {
-			assertEquals("Initializer failed : " + e.toString(),
-					"java.security.cert.CertificateException", e.toString());
-		} catch (Exception e) {
-			fail("Unexpected exception during test : " + e);
-		}
-	}
-
-	/**
-	 * @tests java.security.cert.CertificateException#CertificateException(java.lang.String)
-	 */
-	public void test_ConstructorLjava_lang_String() {
-		// Test for method
-		// java.security.cert.CertificateException(java.lang.String)
-		try {
-			if (true) {
-				throw new CertificateException("Some error message");
-			}
-			fail("Should have thrown CertificateException");
-		} catch (CertificateException e) {
-			assertEquals("Initializer failed",
-					"Some error message", e.getMessage());
-		} catch (Exception e) {
-			fail("Unexpected exception during test : " + e);
-		}
-	}
+/* Copyright 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.harmony.security.tests.java.security.cert;
+
+import java.security.cert.CertificateException;
+
+import junit.framework.TestCase;
+
+public class CertificateException2Test extends junit.framework.TestCase {
+
+	/**
+	 * @tests java.security.cert.CertificateException#CertificateException()
+	 */
+	public void test_Constructor() {
+		// Test for method java.security.cert.CertificateException()
+		try {
+			if (true) {
+				throw new CertificateException();
+			}
+			fail("Should have thrown CertificateException");
+		} catch (CertificateException e) {
+			assertEquals("Initializer failed : " + e.toString(),
+					"java.security.cert.CertificateException", e.toString());
+		} catch (Exception e) {
+			fail("Unexpected exception during test : " + e);
+		}
+	}
+
+	/**
+	 * @tests java.security.cert.CertificateException#CertificateException(java.lang.String)
+	 */
+	public void test_ConstructorLjava_lang_String() {
+		// Test for method
+		// java.security.cert.CertificateException(java.lang.String)
+		try {
+			if (true) {
+				throw new CertificateException("Some error message");
+			}
+			fail("Should have thrown CertificateException");
+		} catch (CertificateException e) {
+			assertEquals("Initializer failed",
+					"Some error message", e.getMessage());
+		} catch (Exception e) {
+			fail("Unexpected exception during test : " + e);
+		}
+	}
 }

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateException2Test.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateExceptionTest.java?view=diff&rev=443539&r1=443538&r2=443539
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateExceptionTest.java Thu Sep 14 18:17:39 2006
@@ -1,240 +1,240 @@
-/*
- *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
-package org.apache.harmony.security.tests.java.security.cert;
-
-import java.security.cert.CertificateException;
-
-import junit.framework.TestCase;
-
-
-/**
- * Tests for <code>CertificateException</code> class constructors and methods.
- * 
- */
-public class CertificateExceptionTest extends TestCase {
-
-    public static void main(String[] args) {
-    }
-
-    /**
-     * Constructor for CertificateExceptionTests.
-     * 
-     * @param arg0
-     */
-    public CertificateExceptionTest(String arg0) {
-        super(arg0);
-    }
-
-    private static String[] msgs = {
-            "",
-            "Check new message",
-            "Check new message Check new message Check new message Check new message Check new message" };
-
-    private static Throwable tCause = new Throwable("Throwable for exception");
-
-    static String createErr(Exception tE, Exception eE) {
-        return "CertificateException ".concat(tE.toString()).concat(
-                " is not equal to caught exception: ").concat(eE.toString());
-    }
-
-    /**
-     * Test for <code>CertificateException()</code> constructor Assertion:
-     * constructs CertificateException with no detail message
-     */
-    public void testCertificateException01() {
-        CertificateException tE = new CertificateException();
-        assertNull("getMessage() must return null.", tE.getMessage());
-        assertNull("getCause() must return null", tE.getCause());
-        try {
-            throw tE;
-        } catch (Exception e) {
-            assertTrue(createErr(tE, e), tE.equals(e));
-        }
-    }
-
-    /**
-     * Test for <code>CertificateException(String)</code> constructor
-     * Assertion: constructs CertificateException with detail message msg.
-     * Parameter <code>msg</code> is not null.
-     */
-    public void testCertificateException02() {
-        CertificateException tE;
-        for (int i = 0; i < msgs.length; i++) {
-            tE = new CertificateException(msgs[i]);
-            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
-                    .getMessage(), msgs[i]);
-            assertNull("getCause() must return null", tE.getCause());
-            try {
-                throw tE;
-            } catch (Exception e) {
-                assertTrue(createErr(tE, e), tE.equals(e));
-            }
-        }
-    }
-
-    /**
-     * Test for <code>CertificateException(String)</code> constructor
-     * Assertion: constructs CertificateException when <code>msg</code> is
-     * null
-     */
-    public void testCertificateException03() {
-        String msg = null;
-        CertificateException tE = new CertificateException(msg);
-        assertNull("getMessage() must return null.", tE.getMessage());
-        assertNull("getCause() must return null", tE.getCause());
-        try {
-            throw tE;
-        } catch (Exception e) {
-            assertTrue(createErr(tE, e), tE.equals(e));
-        }
-    }
-
-    /**
-     * Test for <code>CertificateException(Throwable)</code> constructor
-     * Assertion: constructs CertificateException when <code>cause</code> is
-     * null
-     */
-    public void testCertificateException04() {
-        Throwable cause = null;
-        CertificateException tE = new CertificateException(cause);
-        assertNull("getMessage() must return null.", tE.getMessage());
-        assertNull("getCause() must return null", tE.getCause());
-        try {
-            throw tE;
-        } catch (Exception e) {
-            assertTrue(createErr(tE, e), tE.equals(e));
-        }
-    }
-
-    /**
-     * Test for <code>CertificateException(Throwable)</code> constructor
-     * Assertion: constructs CertificateException when <code>cause</code> is
-     * not null
-     */
-    public void testCertificateException05() {
-        CertificateException tE = new CertificateException(tCause);
-        if (tE.getMessage() != null) {
-            String toS = tCause.toString();
-            String getM = tE.getMessage();
-            assertTrue("getMessage() should contain ".concat(toS), (getM
-                    .indexOf(toS) != -1));
-        }
-        assertNotNull("getCause() must not return null", tE.getCause());
-        assertEquals("getCause() must return ".concat(tCause.toString()), tE
-                .getCause(), tCause);
-        try {
-            throw tE;
-        } catch (Exception e) {
-            assertTrue(createErr(tE, e), tE.equals(e));
-        }
-    }
-
-    /**
-     * Test for <code>CertificateException(String, Throwable)</code>
-     * constructor Assertion: constructs CertificateException when
-     * <code>cause</code> is null <code>msg</code> is null
-     */
-    public void testCertificateException06() {
-        CertificateException tE = new CertificateException(null, null);
-        assertNull("getMessage() must return null", tE.getMessage());
-        assertNull("getCause() must return null", tE.getCause());
-        try {
-            throw tE;
-        } catch (Exception e) {
-            assertTrue(createErr(tE, e), tE.equals(e));
-        }
-    }
-
-    /**
-     * Test for <code>CertificateException(String, Throwable)</code>
-     * constructor Assertion: constructs CertificateException when
-     * <code>cause</code> is null <code>msg</code> is not null
-     */
-    public void testCertificateException07() {
-        CertificateException tE;
-        for (int i = 0; i < msgs.length; i++) {
-            tE = new CertificateException(msgs[i], null);
-            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
-                    .getMessage(), msgs[i]);
-            assertNull("getCause() must return null", tE.getCause());
-            try {
-                throw tE;
-            } catch (Exception e) {
-                assertTrue(createErr(tE, e), tE.equals(e));
-            }
-        }
-    }
-
-    /**
-     * Test for <code>CertificateException(String, Throwable)</code>
-     * constructor Assertion: constructs CertificateException when
-     * <code>cause</code> is not null <code>msg</code> is null
-     */
-    public void testCertificateException08() {
-        CertificateException tE = new CertificateException(null, tCause);
-        if (tE.getMessage() != null) {
-            String toS = tCause.toString();
-            String getM = tE.getMessage();
-            assertTrue("getMessage() must should ".concat(toS), (getM
-                    .indexOf(toS) != -1));
-        }
-        assertNotNull("getCause() must not return null", tE.getCause());
-        assertEquals("getCause() must return ".concat(tCause.toString()), tE
-                .getCause(), tCause);
-        try {
-            throw tE;
-        } catch (Exception e) {
-            assertTrue(createErr(tE, e), tE.equals(e));
-        }
-    }
-
-    /**
-     * Test for <code>CertificateException(String, Throwable)</code>
-     * constructor Assertion: constructs CertificateException when
-     * <code>cause</code> is not null <code>msg</code> is not null
-     */
-    public void testCertificateException09() {
-        CertificateException tE;
-        for (int i = 0; i < msgs.length; i++) {
-            tE = new CertificateException(msgs[i], tCause);
-            String getM = tE.getMessage();
-            String toS = tCause.toString();
-            if (msgs[i].length() > 0) {
-                assertTrue("getMessage() must contain ".concat(msgs[i]), getM
-                        .indexOf(msgs[i]) != -1);
-                if (!getM.equals(msgs[i])) {
-                    assertTrue("getMessage() should contain ".concat(toS), getM
-                            .indexOf(toS) != -1);
-                }
-            }
-            assertNotNull("getCause() must not return null", tE.getCause());
-            assertEquals("getCause() must return ".concat(tCause.toString()),
-                    tE.getCause(), tCause);
-
-            try {
-                throw tE;
-            } catch (Exception e) {
-                assertTrue(createErr(tE, e), tE.equals(e));
-            }
-        }
-    }
-}
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+* @author Vera Y. Petrashkova
+* @version $Revision$
+*/
+
+package org.apache.harmony.security.tests.java.security.cert;
+
+import java.security.cert.CertificateException;
+
+import junit.framework.TestCase;
+
+
+/**
+ * Tests for <code>CertificateException</code> class constructors and methods.
+ * 
+ */
+public class CertificateExceptionTest extends TestCase {
+
+    public static void main(String[] args) {
+    }
+
+    /**
+     * Constructor for CertificateExceptionTests.
+     * 
+     * @param arg0
+     */
+    public CertificateExceptionTest(String arg0) {
+        super(arg0);
+    }
+
+    private static String[] msgs = {
+            "",
+            "Check new message",
+            "Check new message Check new message Check new message Check new message Check new message" };
+
+    private static Throwable tCause = new Throwable("Throwable for exception");
+
+    static String createErr(Exception tE, Exception eE) {
+        return "CertificateException ".concat(tE.toString()).concat(
+                " is not equal to caught exception: ").concat(eE.toString());
+    }
+
+    /**
+     * Test for <code>CertificateException()</code> constructor Assertion:
+     * constructs CertificateException with no detail message
+     */
+    public void testCertificateException01() {
+        CertificateException tE = new CertificateException();
+        assertNull("getMessage() must return null.", tE.getMessage());
+        assertNull("getCause() must return null", tE.getCause());
+        try {
+            throw tE;
+        } catch (Exception e) {
+            assertTrue(createErr(tE, e), tE.equals(e));
+        }
+    }
+
+    /**
+     * Test for <code>CertificateException(String)</code> constructor
+     * Assertion: constructs CertificateException with detail message msg.
+     * Parameter <code>msg</code> is not null.
+     */
+    public void testCertificateException02() {
+        CertificateException tE;
+        for (int i = 0; i < msgs.length; i++) {
+            tE = new CertificateException(msgs[i]);
+            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
+                    .getMessage(), msgs[i]);
+            assertNull("getCause() must return null", tE.getCause());
+            try {
+                throw tE;
+            } catch (Exception e) {
+                assertTrue(createErr(tE, e), tE.equals(e));
+            }
+        }
+    }
+
+    /**
+     * Test for <code>CertificateException(String)</code> constructor
+     * Assertion: constructs CertificateException when <code>msg</code> is
+     * null
+     */
+    public void testCertificateException03() {
+        String msg = null;
+        CertificateException tE = new CertificateException(msg);
+        assertNull("getMessage() must return null.", tE.getMessage());
+        assertNull("getCause() must return null", tE.getCause());
+        try {
+            throw tE;
+        } catch (Exception e) {
+            assertTrue(createErr(tE, e), tE.equals(e));
+        }
+    }
+
+    /**
+     * Test for <code>CertificateException(Throwable)</code> constructor
+     * Assertion: constructs CertificateException when <code>cause</code> is
+     * null
+     */
+    public void testCertificateException04() {
+        Throwable cause = null;
+        CertificateException tE = new CertificateException(cause);
+        assertNull("getMessage() must return null.", tE.getMessage());
+        assertNull("getCause() must return null", tE.getCause());
+        try {
+            throw tE;
+        } catch (Exception e) {
+            assertTrue(createErr(tE, e), tE.equals(e));
+        }
+    }
+
+    /**
+     * Test for <code>CertificateException(Throwable)</code> constructor
+     * Assertion: constructs CertificateException when <code>cause</code> is
+     * not null
+     */
+    public void testCertificateException05() {
+        CertificateException tE = new CertificateException(tCause);
+        if (tE.getMessage() != null) {
+            String toS = tCause.toString();
+            String getM = tE.getMessage();
+            assertTrue("getMessage() should contain ".concat(toS), (getM
+                    .indexOf(toS) != -1));
+        }
+        assertNotNull("getCause() must not return null", tE.getCause());
+        assertEquals("getCause() must return ".concat(tCause.toString()), tE
+                .getCause(), tCause);
+        try {
+            throw tE;
+        } catch (Exception e) {
+            assertTrue(createErr(tE, e), tE.equals(e));
+        }
+    }
+
+    /**
+     * Test for <code>CertificateException(String, Throwable)</code>
+     * constructor Assertion: constructs CertificateException when
+     * <code>cause</code> is null <code>msg</code> is null
+     */
+    public void testCertificateException06() {
+        CertificateException tE = new CertificateException(null, null);
+        assertNull("getMessage() must return null", tE.getMessage());
+        assertNull("getCause() must return null", tE.getCause());
+        try {
+            throw tE;
+        } catch (Exception e) {
+            assertTrue(createErr(tE, e), tE.equals(e));
+        }
+    }
+
+    /**
+     * Test for <code>CertificateException(String, Throwable)</code>
+     * constructor Assertion: constructs CertificateException when
+     * <code>cause</code> is null <code>msg</code> is not null
+     */
+    public void testCertificateException07() {
+        CertificateException tE;
+        for (int i = 0; i < msgs.length; i++) {
+            tE = new CertificateException(msgs[i], null);
+            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
+                    .getMessage(), msgs[i]);
+            assertNull("getCause() must return null", tE.getCause());
+            try {
+                throw tE;
+            } catch (Exception e) {
+                assertTrue(createErr(tE, e), tE.equals(e));
+            }
+        }
+    }
+
+    /**
+     * Test for <code>CertificateException(String, Throwable)</code>
+     * constructor Assertion: constructs CertificateException when
+     * <code>cause</code> is not null <code>msg</code> is null
+     */
+    public void testCertificateException08() {
+        CertificateException tE = new CertificateException(null, tCause);
+        if (tE.getMessage() != null) {
+            String toS = tCause.toString();
+            String getM = tE.getMessage();
+            assertTrue("getMessage() must should ".concat(toS), (getM
+                    .indexOf(toS) != -1));
+        }
+        assertNotNull("getCause() must not return null", tE.getCause());
+        assertEquals("getCause() must return ".concat(tCause.toString()), tE
+                .getCause(), tCause);
+        try {
+            throw tE;
+        } catch (Exception e) {
+            assertTrue(createErr(tE, e), tE.equals(e));
+        }
+    }
+
+    /**
+     * Test for <code>CertificateException(String, Throwable)</code>
+     * constructor Assertion: constructs CertificateException when
+     * <code>cause</code> is not null <code>msg</code> is not null
+     */
+    public void testCertificateException09() {
+        CertificateException tE;
+        for (int i = 0; i < msgs.length; i++) {
+            tE = new CertificateException(msgs[i], tCause);
+            String getM = tE.getMessage();
+            String toS = tCause.toString();
+            if (msgs[i].length() > 0) {
+                assertTrue("getMessage() must contain ".concat(msgs[i]), getM
+                        .indexOf(msgs[i]) != -1);
+                if (!getM.equals(msgs[i])) {
+                    assertTrue("getMessage() should contain ".concat(toS), getM
+                            .indexOf(toS) != -1);
+                }
+            }
+            assertNotNull("getCause() must not return null", tE.getCause());
+            assertEquals("getCause() must return ".concat(tCause.toString()),
+                    tE.getCause(), tCause);
+
+            try {
+                throw tE;
+            } catch (Exception e) {
+                assertTrue(createErr(tE, e), tE.equals(e));
+            }
+        }
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateExceptionTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateExpiredExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateExpiredExceptionTest.java?view=diff&rev=443539&r1=443538&r2=443539
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateExpiredExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateExpiredExceptionTest.java Thu Sep 14 18:17:39 2006
@@ -1,111 +1,111 @@
-/*
- *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
-package org.apache.harmony.security.tests.java.security.cert;
-
-import java.security.cert.CertificateExpiredException;
-
-import junit.framework.TestCase;
-
-
-/**
- * Tests for <code>DigestException</code> class constructors and methods.
- * 
- */
-public class CertificateExpiredExceptionTest extends TestCase {
-
-    public static void main(String[] args) {
-    }
-
-    /**
-     * Constructor for CertificateExpiredExceptionTests.
-     * 
-     * @param arg0
-     */
-    public CertificateExpiredExceptionTest(String arg0) {
-        super(arg0);
-    }
-
-    static String[] msgs = {
-            "",
-            "Check new message",
-            "Check new message Check new message Check new message Check new message Check new message" };
-
-    static Throwable tCause = new Throwable("Throwable for exception");
-
-    static String createErr(Exception tE, Exception eE) {
-        return "CertificateExpiredException: ".concat(tE.toString()).concat(
-                " is not equal to caught exception: ").concat(eE.toString());
-    }
-
-    /**
-     * Test for <code>CertificateExpiredException()</code> constructor
-     * Assertion: constructs CertificateExpiredException with no detail message
-     */
-    public void testCertificateExpiredException01() {
-        CertificateExpiredException tE = new CertificateExpiredException();
-        assertNull("getMessage() must return null.", tE.getMessage());
-        assertNull("getCause() must return null", tE.getCause());
-        try {
-            throw tE;
-        } catch (Exception e) {
-            assertTrue(createErr(tE, e), tE.equals(e));
-        }
-    }
-
-    /**
-     * Test for <code>CertificateExpiredException(String)</code> constructor
-     * Assertion: constructs CertificateExpiredException with detail message
-     * msg. Parameter <code>msg</code> is not null.
-     */
-    public void testCertificateExpiredException02() {
-        CertificateExpiredException tE;
-        for (int i = 0; i < msgs.length; i++) {
-            tE = new CertificateExpiredException(msgs[i]);
-            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
-                    .getMessage(), msgs[i]);
-            assertNull("getCause() must return null", tE.getCause());
-            try {
-                throw tE;
-            } catch (Exception e) {
-                assertTrue(createErr(tE, e), tE.equals(e));
-            }
-        }
-    }
-
-    /**
-     * Test for <code>CertificateExpiredException(String)</code> constructor
-     * Assertion: constructs CertificateExpiredException when <code>msg</code>
-     * is null
-     */
-    public void testCertificateExpiredException03() {
-        String msg = null;
-        CertificateExpiredException tE = new CertificateExpiredException(msg);
-        assertNull("getMessage() must return null.", tE.getMessage());
-        assertNull("getCause() must return null", tE.getCause());
-        try {
-            throw tE;
-        } catch (Exception e) {
-            assertTrue(createErr(tE, e), tE.equals(e));
-        }
-    }
-
-}
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+* @author Vera Y. Petrashkova
+* @version $Revision$
+*/
+
+package org.apache.harmony.security.tests.java.security.cert;
+
+import java.security.cert.CertificateExpiredException;
+
+import junit.framework.TestCase;
+
+
+/**
+ * Tests for <code>DigestException</code> class constructors and methods.
+ * 
+ */
+public class CertificateExpiredExceptionTest extends TestCase {
+
+    public static void main(String[] args) {
+    }
+
+    /**
+     * Constructor for CertificateExpiredExceptionTests.
+     * 
+     * @param arg0
+     */
+    public CertificateExpiredExceptionTest(String arg0) {
+        super(arg0);
+    }
+
+    static String[] msgs = {
+            "",
+            "Check new message",
+            "Check new message Check new message Check new message Check new message Check new message" };
+
+    static Throwable tCause = new Throwable("Throwable for exception");
+
+    static String createErr(Exception tE, Exception eE) {
+        return "CertificateExpiredException: ".concat(tE.toString()).concat(
+                " is not equal to caught exception: ").concat(eE.toString());
+    }
+
+    /**
+     * Test for <code>CertificateExpiredException()</code> constructor
+     * Assertion: constructs CertificateExpiredException with no detail message
+     */
+    public void testCertificateExpiredException01() {
+        CertificateExpiredException tE = new CertificateExpiredException();
+        assertNull("getMessage() must return null.", tE.getMessage());
+        assertNull("getCause() must return null", tE.getCause());
+        try {
+            throw tE;
+        } catch (Exception e) {
+            assertTrue(createErr(tE, e), tE.equals(e));
+        }
+    }
+
+    /**
+     * Test for <code>CertificateExpiredException(String)</code> constructor
+     * Assertion: constructs CertificateExpiredException with detail message
+     * msg. Parameter <code>msg</code> is not null.
+     */
+    public void testCertificateExpiredException02() {
+        CertificateExpiredException tE;
+        for (int i = 0; i < msgs.length; i++) {
+            tE = new CertificateExpiredException(msgs[i]);
+            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
+                    .getMessage(), msgs[i]);
+            assertNull("getCause() must return null", tE.getCause());
+            try {
+                throw tE;
+            } catch (Exception e) {
+                assertTrue(createErr(tE, e), tE.equals(e));
+            }
+        }
+    }
+
+    /**
+     * Test for <code>CertificateExpiredException(String)</code> constructor
+     * Assertion: constructs CertificateExpiredException when <code>msg</code>
+     * is null
+     */
+    public void testCertificateExpiredException03() {
+        String msg = null;
+        CertificateExpiredException tE = new CertificateExpiredException(msg);
+        assertNull("getMessage() must return null.", tE.getMessage());
+        assertNull("getCause() must return null", tE.getCause());
+        try {
+            throw tE;
+        } catch (Exception e) {
+            assertTrue(createErr(tE, e), tE.equals(e));
+        }
+    }
+
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateExpiredExceptionTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message