harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r443539 [21/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/PKIXCertPathCheckerTest.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/PKIXCertPathCheckerTest.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/PKIXCertPathCheckerTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/PKIXCertPathCheckerTest.java Thu Sep 14 18:17:39 2006
@@ -1,85 +1,85 @@
-/*
- *  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 Vladimir N. Molotkov
-* @version $Revision$
-*/
-
-package org.apache.harmony.security.tests.java.security.cert;
-
-import java.security.cert.CertPathValidatorException;
-import java.security.cert.PKIXCertPathChecker;
-import java.util.HashSet;
-
-import org.apache.harmony.security.tests.support.cert.MyCertificate;
-import org.apache.harmony.security.tests.support.cert.TestUtils;
-
-import junit.framework.TestCase;
-
-/**
- * Tests for <code>PKIXCertPathChecker</code>
- * 
- */
-public class PKIXCertPathCheckerTest extends TestCase {
-
-    /**
-     * Constructor for PKIXCertPathCheckerTest.
-     * @param name
-     */
-    public PKIXCertPathCheckerTest(String name) {
-        super(name);
-    }
-
-    //
-    // Tests
-    //
-
-    public final void testClone() {
-        PKIXCertPathChecker pc1 = TestUtils.getTestCertPathChecker();
-        PKIXCertPathChecker pc2 = (PKIXCertPathChecker) pc1.clone();
-        assertNotSame("notSame", pc1, pc2);
-    }
-
-    //
-    // the following tests just call methods
-    // that are abstract in <code>PKIXCertPathChecker</code>
-    // (So they just like signature tests)
-    //
-
-    public final void testIsForwardCheckingSupported() {
-        PKIXCertPathChecker pc = TestUtils.getTestCertPathChecker();
-        pc.isForwardCheckingSupported();
-    }
-
-    public final void testInit()
-        throws CertPathValidatorException {
-        PKIXCertPathChecker pc = TestUtils.getTestCertPathChecker();
-        pc.init(true);
-    }
-
-    public final void testGetSupportedExtensions() {
-        PKIXCertPathChecker pc = TestUtils.getTestCertPathChecker();
-        pc.getSupportedExtensions();
-    }
-
-    public final void testCheck()
-        throws CertPathValidatorException {
-        PKIXCertPathChecker pc = TestUtils.getTestCertPathChecker();
-        pc.check(new MyCertificate("", null), new HashSet());
-    }
-
-}
+/*
+ *  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 Vladimir N. Molotkov
+* @version $Revision$
+*/
+
+package org.apache.harmony.security.tests.java.security.cert;
+
+import java.security.cert.CertPathValidatorException;
+import java.security.cert.PKIXCertPathChecker;
+import java.util.HashSet;
+
+import org.apache.harmony.security.tests.support.cert.MyCertificate;
+import org.apache.harmony.security.tests.support.cert.TestUtils;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests for <code>PKIXCertPathChecker</code>
+ * 
+ */
+public class PKIXCertPathCheckerTest extends TestCase {
+
+    /**
+     * Constructor for PKIXCertPathCheckerTest.
+     * @param name
+     */
+    public PKIXCertPathCheckerTest(String name) {
+        super(name);
+    }
+
+    //
+    // Tests
+    //
+
+    public final void testClone() {
+        PKIXCertPathChecker pc1 = TestUtils.getTestCertPathChecker();
+        PKIXCertPathChecker pc2 = (PKIXCertPathChecker) pc1.clone();
+        assertNotSame("notSame", pc1, pc2);
+    }
+
+    //
+    // the following tests just call methods
+    // that are abstract in <code>PKIXCertPathChecker</code>
+    // (So they just like signature tests)
+    //
+
+    public final void testIsForwardCheckingSupported() {
+        PKIXCertPathChecker pc = TestUtils.getTestCertPathChecker();
+        pc.isForwardCheckingSupported();
+    }
+
+    public final void testInit()
+        throws CertPathValidatorException {
+        PKIXCertPathChecker pc = TestUtils.getTestCertPathChecker();
+        pc.init(true);
+    }
+
+    public final void testGetSupportedExtensions() {
+        PKIXCertPathChecker pc = TestUtils.getTestCertPathChecker();
+        pc.getSupportedExtensions();
+    }
+
+    public final void testCheck()
+        throws CertPathValidatorException {
+        PKIXCertPathChecker pc = TestUtils.getTestCertPathChecker();
+        pc.check(new MyCertificate("", null), new HashSet());
+    }
+
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/PKIXCertPathCheckerTest.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/PKIXCertPathValidatorResultTest.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/PKIXCertPathValidatorResultTest.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/PKIXCertPathValidatorResultTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/PKIXCertPathValidatorResultTest.java Thu Sep 14 18:17:39 2006
@@ -1,316 +1,316 @@
-/*
- *  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 Vladimir N. Molotkov
-* @version $Revision$
-*/
-
-package org.apache.harmony.security.tests.java.security.cert;
-
-import java.security.NoSuchAlgorithmException;
-import java.security.PublicKey;
-import java.security.cert.PKIXCertPathValidatorResult;
-import java.security.cert.PolicyNode;
-import java.security.cert.TrustAnchor;
-import java.security.spec.InvalidKeySpecException;
-
-import org.apache.harmony.security.tests.support.cert.TestUtils;
-
-import junit.framework.TestCase;
-
-/**
- * Tests for <code>PKIXCertPathValidatorResult</code>
- * 
- */
-public class PKIXCertPathValidatorResultTest extends TestCase {
-    /**
-     * PublicKey stub
-     */
-    private static PublicKey testPublicKey = new PublicKey() {
-        public String getAlgorithm() {
-            return "NeverMind";
-        }
-        public String getFormat() {
-            return "NeverMind";
-        }
-        public byte[] getEncoded() {
-            return new byte[] {};
-        }
-    };
-
-    /**
-     * Constructor for PKIXCertPathValidatorResultTest.
-     * @param name
-     */
-    public PKIXCertPathValidatorResultTest(String name) {
-        super(name);
-    }
-
-    //
-    // Tests
-    //
-
-    /**
-     * Test #1 for <code>PKIXCertPathValidatorResult(TrustAnchor,
-     * PolicyNode, PublicKey)</code> constructor<br>
-     * Assertion: creates an instance of
-     * <code>PKIXCertPathValidatorResult</code>
-     * 
-     * @throws NoSuchAlgorithmException
-     * @throws InvalidKeySpecException
-     */
-    public final void testPKIXCertPathValidatorResult01()
-        throws InvalidKeySpecException,
-               NoSuchAlgorithmException {
-        TrustAnchor ta = TestUtils.getTrustAnchor();
-        if (ta == null) {
-            fail(getName() + ": not performed (could not create test TrustAnchor)");
-        }
-        new PKIXCertPathValidatorResult(
-                ta,
-                TestUtils.getPolicyTree(),
-                testPublicKey);
-    }
-
-    /**
-     * Test #2 for <code>PKIXCertPathValidatorResult(TrustAnchor,
-     * PolicyNode, PublicKey)</code> constructor<br>
-     * Assertion: <code>NullPointerException</code> if
-     * <code>TrustAnchor</code> parameter is <code>null</code>
-     */
-    public final void testPKIXCertPathValidatorResult02() {
-        try {
-            // pass null
-            new PKIXCertPathValidatorResult(
-                    null,
-                    TestUtils.getPolicyTree(),
-                    testPublicKey);
-            fail("NPE expected");
-        } catch (NullPointerException e) {
-        }
-    }
-
-    /**
-     * Test #3 for <code>PKIXCertPathValidatorResult(TrustAnchor,
-     * PolicyNode, PublicKey)</code> constructor<br>
-     * Assertion: <code>NullPointerException</code> if
-     * <code>PublicKey</code> parameter is <code>null</code>
-     */
-    public final void testPKIXCertPathValidatorResult03() {
-        TrustAnchor ta = TestUtils.getTrustAnchor();
-        if (ta == null) {
-            fail(getName() + ": not performed (could not create test TrustAnchor)");
-        }
-        try {
-            // pass null
-            new PKIXCertPathValidatorResult(
-                    ta,
-                    TestUtils.getPolicyTree(),
-                    null);
-            fail("NPE expected");
-        } catch (NullPointerException e) {
-        }
-    }
-
-    /**
-     * Test #4 for <code>PKIXCertPathValidatorResult(TrustAnchor,
-     * PolicyNode, PublicKey)</code> constructor<br>
-     * Assertion: <code>PolicyNode</code>can be <code>null</code>
-     */
-    public final void testPKIXCertPathValidatorResult04() throws Exception {
-        TrustAnchor ta = TestUtils.getTrustAnchor();
-        if (ta == null) {
-            fail(getName() + ": not performed (could not create test TrustAnchor)");
-        }
-
-        new PKIXCertPathValidatorResult(
-                ta,
-                null,
-                testPublicKey);
-    }
-
-    /**
-     * Test for <code>getTrustAnchor()</code> method<br>
-     * Assertion: returns <code>TrustAnchor</code> (never <code>null</code>)
-     * @throws NoSuchAlgorithmException
-     * @throws InvalidKeySpecException
-     */
-    public final void testGetTrustAnchor() throws Exception {
-        TrustAnchor ta = TestUtils.getTrustAnchor();
-        if (ta == null) {
-            fail(getName() + ": not performed (could not create test TrustAnchor)");
-        }
-
-        PKIXCertPathValidatorResult vr =
-            new PKIXCertPathValidatorResult(
-                    ta,
-                    null,
-                    testPublicKey);
-
-        // must return the same reference passed
-        // as a parameter to the constructor
-        assertSame(ta, vr.getTrustAnchor());
-    }
-
-    /**
-     * Test for <code>getPublicKey()</code> method<br>
-     * Assertion: returns the subject's public key (never <code>null</code>)
-     * @throws NoSuchAlgorithmException
-     * @throws InvalidKeySpecException
-     */
-    public final void testGetPublicKey() throws Exception {
-        TrustAnchor ta = TestUtils.getTrustAnchor();
-        if (ta == null) {
-            fail(getName() + ": not performed (could not create test TrustAnchor)");
-        }
-
-        PublicKey pk = testPublicKey;
-        PKIXCertPathValidatorResult vr =
-            new PKIXCertPathValidatorResult(
-                    ta,
-                    null,
-                    pk);
-
-        // must return the same reference passed
-        // as a parameter to the constructor
-        assertSame(pk, vr.getPublicKey());
-    }
-
-    /**
-     * Test for <code>getPolicyTree()</code> method<br>
-     * Assertion: returns the root node of the valid
-     * policy tree or <code>null</code> if there are
-     * no valid policies
-     * @throws NoSuchAlgorithmException
-     * @throws InvalidKeySpecException
-     */
-    public final void testGetPolicyTree01() throws Exception {
-        TrustAnchor ta = TestUtils.getTrustAnchor();
-        if (ta == null) {
-            fail(getName() + ": not performed (could not create test TrustAnchor)");
-        }
-
-        // valid policy tree case;
-        PolicyNode pn = TestUtils.getPolicyTree();
-        PKIXCertPathValidatorResult vr =
-            new PKIXCertPathValidatorResult(
-                    ta,
-                    pn,
-                    testPublicKey);
-
-        // must return the same reference passed
-        // as a parameter to the constructor
-        assertSame(pn, vr.getPolicyTree());
-    }
-
-    /**
-     * Test for <code>getPolicyTree()</code> method<br>
-     * Assertion: returns the root node of the valid
-     * policy tree or <code>null</code> if there are
-     * no valid policies
-     * @throws NoSuchAlgorithmException
-     * @throws InvalidKeySpecException
-     */
-    public final void testGetPolicyTree02() throws Exception {
-        TrustAnchor ta = TestUtils.getTrustAnchor();
-        if (ta == null) {
-            fail(getName() + ": not performed (could not create test TrustAnchor)");
-        }
-
-        // no valid policy tree case (null)
-        PKIXCertPathValidatorResult vr =
-            new PKIXCertPathValidatorResult(
-                    ta,
-                    null,
-                    testPublicKey);
-
-        // must return the same reference passed
-        // as a parameter to the constructor
-        assertNull(vr.getPolicyTree());
-    }
-
-    /**
-     * Test for <code>clone()</code> method<br>
-     * Assertion: returns a copy of this object
-     * @throws NoSuchAlgorithmException
-     * @throws InvalidKeySpecException
-     */
-    public final void testClone() throws Exception {
-        TrustAnchor ta = TestUtils.getTrustAnchor();
-        if (ta == null) {
-            fail(getName() + ": not performed (could not create test TrustAnchor)");
-        }
-
-        PKIXCertPathValidatorResult vr1 =
-            new PKIXCertPathValidatorResult(
-                    ta,
-                    TestUtils.getPolicyTree(),
-                    testPublicKey);
-
-        PKIXCertPathValidatorResult vr2 =
-            (PKIXCertPathValidatorResult) vr1.clone();
-
-        // check that method makes shallow copy
-        assertNotSame("notSame", vr1, vr2);
-        assertSame("trustAncor", vr1.getTrustAnchor(), vr2.getTrustAnchor());
-        assertSame("policyTree", vr1.getPolicyTree(), vr2.getPolicyTree());
-        assertSame("publicKey", vr1.getPublicKey(), vr2.getPublicKey());
-    }
-
-    /**
-     * Test #1 for <code>toString()</code> method<br>
-     * Assertion: Returns a formatted string describing this object
-     * @throws NoSuchAlgorithmException
-     * @throws InvalidKeySpecException
-     */
-    public final void testToString01() throws Exception {
-        TrustAnchor ta = TestUtils.getTrustAnchor();
-        if (ta == null) {
-            fail(getName() + ": not performed (could not create test TrustAnchor)");
-        }
-
-        PKIXCertPathValidatorResult vr =
-            new PKIXCertPathValidatorResult(
-                    ta,
-                    TestUtils.getPolicyTree(),
-                    testPublicKey);
-
-        assertNotNull(vr.toString());
-    }
-
-    /**
-     * Test #2 for <code>toString()</code> method<br>
-     * Assertion: Returns a formatted string describing this object
-     * @throws NoSuchAlgorithmException
-     * @throws InvalidKeySpecException
-     */
-    public final void testToString02() throws Exception {
-        TrustAnchor ta = TestUtils.getTrustAnchor();
-        if (ta == null) {
-            fail(getName() + ": not performed (could not create test TrustAnchor)");
-        }
-
-        PKIXCertPathValidatorResult vr =
-            new PKIXCertPathValidatorResult(
-                    ta,
-                    null,
-                    testPublicKey);
-
-        assertNotNull(vr.toString());
-    }
-
-}
+/*
+ *  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 Vladimir N. Molotkov
+* @version $Revision$
+*/
+
+package org.apache.harmony.security.tests.java.security.cert;
+
+import java.security.NoSuchAlgorithmException;
+import java.security.PublicKey;
+import java.security.cert.PKIXCertPathValidatorResult;
+import java.security.cert.PolicyNode;
+import java.security.cert.TrustAnchor;
+import java.security.spec.InvalidKeySpecException;
+
+import org.apache.harmony.security.tests.support.cert.TestUtils;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests for <code>PKIXCertPathValidatorResult</code>
+ * 
+ */
+public class PKIXCertPathValidatorResultTest extends TestCase {
+    /**
+     * PublicKey stub
+     */
+    private static PublicKey testPublicKey = new PublicKey() {
+        public String getAlgorithm() {
+            return "NeverMind";
+        }
+        public String getFormat() {
+            return "NeverMind";
+        }
+        public byte[] getEncoded() {
+            return new byte[] {};
+        }
+    };
+
+    /**
+     * Constructor for PKIXCertPathValidatorResultTest.
+     * @param name
+     */
+    public PKIXCertPathValidatorResultTest(String name) {
+        super(name);
+    }
+
+    //
+    // Tests
+    //
+
+    /**
+     * Test #1 for <code>PKIXCertPathValidatorResult(TrustAnchor,
+     * PolicyNode, PublicKey)</code> constructor<br>
+     * Assertion: creates an instance of
+     * <code>PKIXCertPathValidatorResult</code>
+     * 
+     * @throws NoSuchAlgorithmException
+     * @throws InvalidKeySpecException
+     */
+    public final void testPKIXCertPathValidatorResult01()
+        throws InvalidKeySpecException,
+               NoSuchAlgorithmException {
+        TrustAnchor ta = TestUtils.getTrustAnchor();
+        if (ta == null) {
+            fail(getName() + ": not performed (could not create test TrustAnchor)");
+        }
+        new PKIXCertPathValidatorResult(
+                ta,
+                TestUtils.getPolicyTree(),
+                testPublicKey);
+    }
+
+    /**
+     * Test #2 for <code>PKIXCertPathValidatorResult(TrustAnchor,
+     * PolicyNode, PublicKey)</code> constructor<br>
+     * Assertion: <code>NullPointerException</code> if
+     * <code>TrustAnchor</code> parameter is <code>null</code>
+     */
+    public final void testPKIXCertPathValidatorResult02() {
+        try {
+            // pass null
+            new PKIXCertPathValidatorResult(
+                    null,
+                    TestUtils.getPolicyTree(),
+                    testPublicKey);
+            fail("NPE expected");
+        } catch (NullPointerException e) {
+        }
+    }
+
+    /**
+     * Test #3 for <code>PKIXCertPathValidatorResult(TrustAnchor,
+     * PolicyNode, PublicKey)</code> constructor<br>
+     * Assertion: <code>NullPointerException</code> if
+     * <code>PublicKey</code> parameter is <code>null</code>
+     */
+    public final void testPKIXCertPathValidatorResult03() {
+        TrustAnchor ta = TestUtils.getTrustAnchor();
+        if (ta == null) {
+            fail(getName() + ": not performed (could not create test TrustAnchor)");
+        }
+        try {
+            // pass null
+            new PKIXCertPathValidatorResult(
+                    ta,
+                    TestUtils.getPolicyTree(),
+                    null);
+            fail("NPE expected");
+        } catch (NullPointerException e) {
+        }
+    }
+
+    /**
+     * Test #4 for <code>PKIXCertPathValidatorResult(TrustAnchor,
+     * PolicyNode, PublicKey)</code> constructor<br>
+     * Assertion: <code>PolicyNode</code>can be <code>null</code>
+     */
+    public final void testPKIXCertPathValidatorResult04() throws Exception {
+        TrustAnchor ta = TestUtils.getTrustAnchor();
+        if (ta == null) {
+            fail(getName() + ": not performed (could not create test TrustAnchor)");
+        }
+
+        new PKIXCertPathValidatorResult(
+                ta,
+                null,
+                testPublicKey);
+    }
+
+    /**
+     * Test for <code>getTrustAnchor()</code> method<br>
+     * Assertion: returns <code>TrustAnchor</code> (never <code>null</code>)
+     * @throws NoSuchAlgorithmException
+     * @throws InvalidKeySpecException
+     */
+    public final void testGetTrustAnchor() throws Exception {
+        TrustAnchor ta = TestUtils.getTrustAnchor();
+        if (ta == null) {
+            fail(getName() + ": not performed (could not create test TrustAnchor)");
+        }
+
+        PKIXCertPathValidatorResult vr =
+            new PKIXCertPathValidatorResult(
+                    ta,
+                    null,
+                    testPublicKey);
+
+        // must return the same reference passed
+        // as a parameter to the constructor
+        assertSame(ta, vr.getTrustAnchor());
+    }
+
+    /**
+     * Test for <code>getPublicKey()</code> method<br>
+     * Assertion: returns the subject's public key (never <code>null</code>)
+     * @throws NoSuchAlgorithmException
+     * @throws InvalidKeySpecException
+     */
+    public final void testGetPublicKey() throws Exception {
+        TrustAnchor ta = TestUtils.getTrustAnchor();
+        if (ta == null) {
+            fail(getName() + ": not performed (could not create test TrustAnchor)");
+        }
+
+        PublicKey pk = testPublicKey;
+        PKIXCertPathValidatorResult vr =
+            new PKIXCertPathValidatorResult(
+                    ta,
+                    null,
+                    pk);
+
+        // must return the same reference passed
+        // as a parameter to the constructor
+        assertSame(pk, vr.getPublicKey());
+    }
+
+    /**
+     * Test for <code>getPolicyTree()</code> method<br>
+     * Assertion: returns the root node of the valid
+     * policy tree or <code>null</code> if there are
+     * no valid policies
+     * @throws NoSuchAlgorithmException
+     * @throws InvalidKeySpecException
+     */
+    public final void testGetPolicyTree01() throws Exception {
+        TrustAnchor ta = TestUtils.getTrustAnchor();
+        if (ta == null) {
+            fail(getName() + ": not performed (could not create test TrustAnchor)");
+        }
+
+        // valid policy tree case;
+        PolicyNode pn = TestUtils.getPolicyTree();
+        PKIXCertPathValidatorResult vr =
+            new PKIXCertPathValidatorResult(
+                    ta,
+                    pn,
+                    testPublicKey);
+
+        // must return the same reference passed
+        // as a parameter to the constructor
+        assertSame(pn, vr.getPolicyTree());
+    }
+
+    /**
+     * Test for <code>getPolicyTree()</code> method<br>
+     * Assertion: returns the root node of the valid
+     * policy tree or <code>null</code> if there are
+     * no valid policies
+     * @throws NoSuchAlgorithmException
+     * @throws InvalidKeySpecException
+     */
+    public final void testGetPolicyTree02() throws Exception {
+        TrustAnchor ta = TestUtils.getTrustAnchor();
+        if (ta == null) {
+            fail(getName() + ": not performed (could not create test TrustAnchor)");
+        }
+
+        // no valid policy tree case (null)
+        PKIXCertPathValidatorResult vr =
+            new PKIXCertPathValidatorResult(
+                    ta,
+                    null,
+                    testPublicKey);
+
+        // must return the same reference passed
+        // as a parameter to the constructor
+        assertNull(vr.getPolicyTree());
+    }
+
+    /**
+     * Test for <code>clone()</code> method<br>
+     * Assertion: returns a copy of this object
+     * @throws NoSuchAlgorithmException
+     * @throws InvalidKeySpecException
+     */
+    public final void testClone() throws Exception {
+        TrustAnchor ta = TestUtils.getTrustAnchor();
+        if (ta == null) {
+            fail(getName() + ": not performed (could not create test TrustAnchor)");
+        }
+
+        PKIXCertPathValidatorResult vr1 =
+            new PKIXCertPathValidatorResult(
+                    ta,
+                    TestUtils.getPolicyTree(),
+                    testPublicKey);
+
+        PKIXCertPathValidatorResult vr2 =
+            (PKIXCertPathValidatorResult) vr1.clone();
+
+        // check that method makes shallow copy
+        assertNotSame("notSame", vr1, vr2);
+        assertSame("trustAncor", vr1.getTrustAnchor(), vr2.getTrustAnchor());
+        assertSame("policyTree", vr1.getPolicyTree(), vr2.getPolicyTree());
+        assertSame("publicKey", vr1.getPublicKey(), vr2.getPublicKey());
+    }
+
+    /**
+     * Test #1 for <code>toString()</code> method<br>
+     * Assertion: Returns a formatted string describing this object
+     * @throws NoSuchAlgorithmException
+     * @throws InvalidKeySpecException
+     */
+    public final void testToString01() throws Exception {
+        TrustAnchor ta = TestUtils.getTrustAnchor();
+        if (ta == null) {
+            fail(getName() + ": not performed (could not create test TrustAnchor)");
+        }
+
+        PKIXCertPathValidatorResult vr =
+            new PKIXCertPathValidatorResult(
+                    ta,
+                    TestUtils.getPolicyTree(),
+                    testPublicKey);
+
+        assertNotNull(vr.toString());
+    }
+
+    /**
+     * Test #2 for <code>toString()</code> method<br>
+     * Assertion: Returns a formatted string describing this object
+     * @throws NoSuchAlgorithmException
+     * @throws InvalidKeySpecException
+     */
+    public final void testToString02() throws Exception {
+        TrustAnchor ta = TestUtils.getTrustAnchor();
+        if (ta == null) {
+            fail(getName() + ": not performed (could not create test TrustAnchor)");
+        }
+
+        PKIXCertPathValidatorResult vr =
+            new PKIXCertPathValidatorResult(
+                    ta,
+                    null,
+                    testPublicKey);
+
+        assertNotNull(vr.toString());
+    }
+
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/PKIXCertPathValidatorResultTest.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/X509CRL2Test.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/X509CRL2Test.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/X509CRL2Test.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/X509CRL2Test.java Thu Sep 14 18:17:39 2006
@@ -1,64 +1,64 @@
-/* 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.io.InputStream;
-import java.security.cert.CertificateFactory;
-import java.security.cert.X509Certificate;
-import java.util.Iterator;
-import java.util.Vector;
-
-import tests.support.resource.Support_Resources;
-
-import junit.framework.TestCase;
-
-public class X509CRL2Test extends junit.framework.TestCase {
-
-	private X509Certificate pemCert = null;
-
-	protected void setUp() throws Exception {
-
-        InputStream is = Support_Resources
-                .getResourceStream("hyts_certificate_PEM.txt");
-
-        CertificateFactory certFact = CertificateFactory.getInstance("X509");
-        pemCert = (X509Certificate) certFact.generateCertificate(is);
-    }
-
-	/**
-	 * @tests java.security.cert.X509CRL#getExtensionValue(java.lang.String)
-	 */
-	public void test_getExtensionValueLjava_lang_String() {
-		if (pemCert != null) {
-			Vector extensionOids = new Vector();
-			extensionOids.addAll(pemCert.getCriticalExtensionOIDs());
-			extensionOids.addAll(pemCert.getNonCriticalExtensionOIDs());
-			Iterator i = extensionOids.iterator();
-			while (i.hasNext()) {
-				String oid = (String) i.next();
-				byte[] value = pemCert.getExtensionValue(oid);
-				if (value != null && value.length > 0) {
-					// check that it is an encoded as a OCTET STRING
-					assertTrue("The extension value for the oid " + oid
-							+ " was not encoded as an OCTET STRING",
-							value[0] == 0x04);
-				}
-			}// end while
-		} else {
-			fail("Unable to obtain X509Certificate");
-		}
-	}
+/* 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.io.InputStream;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+import java.util.Iterator;
+import java.util.Vector;
+
+import tests.support.resource.Support_Resources;
+
+import junit.framework.TestCase;
+
+public class X509CRL2Test extends junit.framework.TestCase {
+
+	private X509Certificate pemCert = null;
+
+	protected void setUp() throws Exception {
+
+        InputStream is = Support_Resources
+                .getResourceStream("hyts_certificate_PEM.txt");
+
+        CertificateFactory certFact = CertificateFactory.getInstance("X509");
+        pemCert = (X509Certificate) certFact.generateCertificate(is);
+    }
+
+	/**
+	 * @tests java.security.cert.X509CRL#getExtensionValue(java.lang.String)
+	 */
+	public void test_getExtensionValueLjava_lang_String() {
+		if (pemCert != null) {
+			Vector extensionOids = new Vector();
+			extensionOids.addAll(pemCert.getCriticalExtensionOIDs());
+			extensionOids.addAll(pemCert.getNonCriticalExtensionOIDs());
+			Iterator i = extensionOids.iterator();
+			while (i.hasNext()) {
+				String oid = (String) i.next();
+				byte[] value = pemCert.getExtensionValue(oid);
+				if (value != null && value.length > 0) {
+					// check that it is an encoded as a OCTET STRING
+					assertTrue("The extension value for the oid " + oid
+							+ " was not encoded as an OCTET STRING",
+							value[0] == 0x04);
+				}
+			}// end while
+		} else {
+			fail("Unable to obtain X509Certificate");
+		}
+	}
 }

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/X509CRL2Test.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/X509CRLEntry2Test.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/X509CRLEntry2Test.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/X509CRLEntry2Test.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/X509CRLEntry2Test.java Thu Sep 14 18:17:39 2006
@@ -1,64 +1,64 @@
-/* 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.io.InputStream;
-import java.security.cert.CertificateFactory;
-import java.security.cert.X509Certificate;
-import java.util.Iterator;
-import java.util.Vector;
-
-import tests.support.resource.Support_Resources;
-
-import junit.framework.TestCase;
-
-public class X509CRLEntry2Test extends junit.framework.TestCase {
-
-	private X509Certificate pemCert = null;
-
-	protected void setUp() throws Exception {
-
-        InputStream is = Support_Resources
-                .getResourceStream("hyts_certificate_PEM.txt");
-
-        CertificateFactory certFact = CertificateFactory.getInstance("X509");
-        pemCert = (X509Certificate) certFact.generateCertificate(is);
-    }
-
-	/**
-	 * @tests java.security.cert.X509CRLEntry#getExtensionValue(java.lang.String)
-	 */
-	public void test_getExtensionValueLjava_lang_String() {
-		if (pemCert != null) {
-			Vector extensionOids = new Vector();
-			extensionOids.addAll(pemCert.getCriticalExtensionOIDs());
-			extensionOids.addAll(pemCert.getNonCriticalExtensionOIDs());
-			Iterator i = extensionOids.iterator();
-			while (i.hasNext()) {
-				String oid = (String) i.next();
-				byte[] value = pemCert.getExtensionValue(oid);
-				if (value != null && value.length > 0) {
-					// check that it is an encoded as a OCTET STRING
-					assertTrue("The extension value for the oid " + oid
-							+ " was not encoded as an OCTET STRING",
-							value[0] == 0x04);
-				}
-			}// end while
-		} else {
-			fail("Unable to obtain X509Certificate");
-		}
-	}
+/* 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.io.InputStream;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+import java.util.Iterator;
+import java.util.Vector;
+
+import tests.support.resource.Support_Resources;
+
+import junit.framework.TestCase;
+
+public class X509CRLEntry2Test extends junit.framework.TestCase {
+
+	private X509Certificate pemCert = null;
+
+	protected void setUp() throws Exception {
+
+        InputStream is = Support_Resources
+                .getResourceStream("hyts_certificate_PEM.txt");
+
+        CertificateFactory certFact = CertificateFactory.getInstance("X509");
+        pemCert = (X509Certificate) certFact.generateCertificate(is);
+    }
+
+	/**
+	 * @tests java.security.cert.X509CRLEntry#getExtensionValue(java.lang.String)
+	 */
+	public void test_getExtensionValueLjava_lang_String() {
+		if (pemCert != null) {
+			Vector extensionOids = new Vector();
+			extensionOids.addAll(pemCert.getCriticalExtensionOIDs());
+			extensionOids.addAll(pemCert.getNonCriticalExtensionOIDs());
+			Iterator i = extensionOids.iterator();
+			while (i.hasNext()) {
+				String oid = (String) i.next();
+				byte[] value = pemCert.getExtensionValue(oid);
+				if (value != null && value.length > 0) {
+					// check that it is an encoded as a OCTET STRING
+					assertTrue("The extension value for the oid " + oid
+							+ " was not encoded as an OCTET STRING",
+							value[0] == 0x04);
+				}
+			}// end while
+		} else {
+			fail("Unable to obtain X509Certificate");
+		}
+	}
 }

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/X509CRLEntry2Test.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/X509CRLEntryTest.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/X509CRLEntryTest.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/X509CRLEntryTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/X509CRLEntryTest.java Thu Sep 14 18:17:39 2006
@@ -1,172 +1,172 @@
-/*
- *  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 Alexander Y. Kleymenov
-* @version $Revision$
-*/
-
-package org.apache.harmony.security.tests.java.security.cert;
-
-import java.math.BigInteger;
-import java.security.cert.CRLException;
-import java.security.cert.X509CRLEntry;
-import java.util.Date;
-import java.util.Set;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- */
-
-public class X509CRLEntryTest extends TestCase {
-
-    X509CRLEntry tbt_crlentry;
-
-    /**
-     * The stub class used for testing of non abstract methods.
-     */
-    private class TBTCRLEntry extends X509CRLEntry {
-        public Set getNonCriticalExtensionOIDs() {
-            return null;
-        }
-
-        public Set getCriticalExtensionOIDs() {
-            return null;
-        }
-
-        public byte[] getExtensionValue(String oid) {
-            return null;
-        }
-
-        public boolean hasUnsupportedCriticalExtension() {
-            return false;
-        }
-
-        public byte[] getEncoded() throws CRLException {
-            return null;
-        }
-
-        public BigInteger getSerialNumber() {
-            return null;
-        }
-
-        public Date getRevocationDate() {
-            return null;
-        }
-
-        public boolean hasExtensions() {
-            return false;
-        }
-
-        public String toString() {
-            return null;
-        }
-    }
-
-    public X509CRLEntryTest() {
-        tbt_crlentry = new TBTCRLEntry() {
-            public byte[] getEncoded() throws CRLException {
-                return new byte[] {1, 2, 3};
-            }
-        };
-    }
-
-    /**
-     * equals(Object other) method testing. Tests the correctnel of equal
-     * operation: it should be reflexive, symmetric, transitive, consistent
-     * and should be false on null object.
-     */
-    public void testEquals() {
-        TBTCRLEntry tbt_crlentry_1 = new TBTCRLEntry() {
-            public byte[] getEncoded() {
-                return new byte[] {1, 2, 3};
-            }
-        };
-
-        TBTCRLEntry tbt_crlentry_2 = new TBTCRLEntry() {
-            public byte[] getEncoded() {
-                return new byte[] {1, 2, 3};
-            }
-        };
-
-        TBTCRLEntry tbt_crlentry_3 = new TBTCRLEntry() {
-            public byte[] getEncoded() {
-                return new byte[] {3, 2, 1};
-            }
-        };
-
-        // checking for reflexive law:
-        assertTrue("The equivalence relation should be reflexive.",
-                                            tbt_crlentry.equals(tbt_crlentry));
-
-        assertEquals("The CRL Entries with equals encoded form should be equal",
-                                            tbt_crlentry, tbt_crlentry_1);
-        // checking for symmetric law:
-        assertTrue("The equivalence relation should be symmetric.",
-                                            tbt_crlentry_1.equals(tbt_crlentry));
-
-        assertEquals("The CRL Entries with equals encoded form should be equal",
-                                            tbt_crlentry_1, tbt_crlentry_2);
-        // checking for transitive law:
-        assertTrue("The equivalence relation should be transitive.",
-                                            tbt_crlentry.equals(tbt_crlentry_2));
-
-        assertFalse("Should not be equal to null object.",
-                                            tbt_crlentry.equals(null));
-
-        assertFalse("The CRL Entries with differing encoded form "
-                                            + "should not be equal.",
-                                            tbt_crlentry.equals(tbt_crlentry_3));
-        assertFalse("The CRL Entries should not be equals to the object "
-                                + "which is not an instance of X509CRLEntry.",
-                                            tbt_crlentry.equals(new Object()));
-    }
-
-    /**
-     * hashCode() method testing. Tests that for equal objects hash codes
-     * are equal.
-     */
-    public void testHashCode() {
-        TBTCRLEntry tbt_crlentry_1 = new TBTCRLEntry() {
-            public byte[] getEncoded() {
-                return new byte[] {1, 2, 3};
-            }
-        };
-        assertTrue("Equal objects should have the same hash codes.",
-                        tbt_crlentry.hashCode() == tbt_crlentry_1.hashCode());
-    }
-
-    /**
-     * getCertificateIssuer() method testing. Tests if the method throws
-     * appropriate exception.
-     */
-    public void testGetCertificateIssuer() {
-        assertNull("The default implementation should return null.", 
-                tbt_crlentry.getCertificateIssuer());
-    }
-
-    public static Test suite() {
-        return new TestSuite(X509CRLEntryTest.class);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(suite());
-    }
-}
-
+/*
+ *  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 Alexander Y. Kleymenov
+* @version $Revision$
+*/
+
+package org.apache.harmony.security.tests.java.security.cert;
+
+import java.math.BigInteger;
+import java.security.cert.CRLException;
+import java.security.cert.X509CRLEntry;
+import java.util.Date;
+import java.util.Set;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ */
+
+public class X509CRLEntryTest extends TestCase {
+
+    X509CRLEntry tbt_crlentry;
+
+    /**
+     * The stub class used for testing of non abstract methods.
+     */
+    private class TBTCRLEntry extends X509CRLEntry {
+        public Set getNonCriticalExtensionOIDs() {
+            return null;
+        }
+
+        public Set getCriticalExtensionOIDs() {
+            return null;
+        }
+
+        public byte[] getExtensionValue(String oid) {
+            return null;
+        }
+
+        public boolean hasUnsupportedCriticalExtension() {
+            return false;
+        }
+
+        public byte[] getEncoded() throws CRLException {
+            return null;
+        }
+
+        public BigInteger getSerialNumber() {
+            return null;
+        }
+
+        public Date getRevocationDate() {
+            return null;
+        }
+
+        public boolean hasExtensions() {
+            return false;
+        }
+
+        public String toString() {
+            return null;
+        }
+    }
+
+    public X509CRLEntryTest() {
+        tbt_crlentry = new TBTCRLEntry() {
+            public byte[] getEncoded() throws CRLException {
+                return new byte[] {1, 2, 3};
+            }
+        };
+    }
+
+    /**
+     * equals(Object other) method testing. Tests the correctnel of equal
+     * operation: it should be reflexive, symmetric, transitive, consistent
+     * and should be false on null object.
+     */
+    public void testEquals() {
+        TBTCRLEntry tbt_crlentry_1 = new TBTCRLEntry() {
+            public byte[] getEncoded() {
+                return new byte[] {1, 2, 3};
+            }
+        };
+
+        TBTCRLEntry tbt_crlentry_2 = new TBTCRLEntry() {
+            public byte[] getEncoded() {
+                return new byte[] {1, 2, 3};
+            }
+        };
+
+        TBTCRLEntry tbt_crlentry_3 = new TBTCRLEntry() {
+            public byte[] getEncoded() {
+                return new byte[] {3, 2, 1};
+            }
+        };
+
+        // checking for reflexive law:
+        assertTrue("The equivalence relation should be reflexive.",
+                                            tbt_crlentry.equals(tbt_crlentry));
+
+        assertEquals("The CRL Entries with equals encoded form should be equal",
+                                            tbt_crlentry, tbt_crlentry_1);
+        // checking for symmetric law:
+        assertTrue("The equivalence relation should be symmetric.",
+                                            tbt_crlentry_1.equals(tbt_crlentry));
+
+        assertEquals("The CRL Entries with equals encoded form should be equal",
+                                            tbt_crlentry_1, tbt_crlentry_2);
+        // checking for transitive law:
+        assertTrue("The equivalence relation should be transitive.",
+                                            tbt_crlentry.equals(tbt_crlentry_2));
+
+        assertFalse("Should not be equal to null object.",
+                                            tbt_crlentry.equals(null));
+
+        assertFalse("The CRL Entries with differing encoded form "
+                                            + "should not be equal.",
+                                            tbt_crlentry.equals(tbt_crlentry_3));
+        assertFalse("The CRL Entries should not be equals to the object "
+                                + "which is not an instance of X509CRLEntry.",
+                                            tbt_crlentry.equals(new Object()));
+    }
+
+    /**
+     * hashCode() method testing. Tests that for equal objects hash codes
+     * are equal.
+     */
+    public void testHashCode() {
+        TBTCRLEntry tbt_crlentry_1 = new TBTCRLEntry() {
+            public byte[] getEncoded() {
+                return new byte[] {1, 2, 3};
+            }
+        };
+        assertTrue("Equal objects should have the same hash codes.",
+                        tbt_crlentry.hashCode() == tbt_crlentry_1.hashCode());
+    }
+
+    /**
+     * getCertificateIssuer() method testing. Tests if the method throws
+     * appropriate exception.
+     */
+    public void testGetCertificateIssuer() {
+        assertNull("The default implementation should return null.", 
+                tbt_crlentry.getCertificateIssuer());
+    }
+
+    public static Test suite() {
+        return new TestSuite(X509CRLEntryTest.class);
+    }
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(suite());
+    }
+}
+

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

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/X509CRLSelectorTest.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/X509CertSelectorTest.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/X509CertSelectorTest.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/X509CertSelectorTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/X509CertSelectorTest.java Thu Sep 14 18:17:39 2006
@@ -1,60 +1,60 @@
-/*
- *  Copyright 2006 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.io.IOException;
-import java.security.cert.X509CertSelector;
-
-import junit.framework.TestCase;
-
-/**
- * X509CertSelectorTest
- */
-public class X509CertSelectorTest extends TestCase {
-
-    /**
-     * @tests addSubjectAlternativeName(int type, String name)
-     */
-    public void testAddSubjectAlternativeName() {
-        // Regression for HARMONY-727
-        int[] types = { 0, 2, 3, 4, 5, 6, 7, 8 };
-        for (int i = 0; i < types.length; i++) {
-            try {
-                new X509CertSelector().addSubjectAlternativeName(types[i],
-                        "0xDFRF");
-                fail("IOException expected");
-            } catch (IOException e) {
-            }
-        }
-    }
-    
-    /**
-     * @tests addPathToName(int type, String name)
-     */
-    public void testAddPathToName() {
-        // Regression for HARMONY-724
-        for (int type = 0; type <= 8; type++) {
-            try {
-                new X509CertSelector().addPathToName(type, (String) null);
-                fail("IOException expected!");
-            } catch (IOException ioe) {
-                // expected
-            }
-        }
-    }
-
-}
+/*
+ *  Copyright 2006 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.io.IOException;
+import java.security.cert.X509CertSelector;
+
+import junit.framework.TestCase;
+
+/**
+ * X509CertSelectorTest
+ */
+public class X509CertSelectorTest extends TestCase {
+
+    /**
+     * @tests addSubjectAlternativeName(int type, String name)
+     */
+    public void testAddSubjectAlternativeName() {
+        // Regression for HARMONY-727
+        int[] types = { 0, 2, 3, 4, 5, 6, 7, 8 };
+        for (int i = 0; i < types.length; i++) {
+            try {
+                new X509CertSelector().addSubjectAlternativeName(types[i],
+                        "0xDFRF");
+                fail("IOException expected");
+            } catch (IOException e) {
+            }
+        }
+    }
+    
+    /**
+     * @tests addPathToName(int type, String name)
+     */
+    public void testAddPathToName() {
+        // Regression for HARMONY-724
+        for (int type = 0; type <= 8; type++) {
+            try {
+                new X509CertSelector().addPathToName(type, (String) null);
+                fail("IOException expected!");
+            } catch (IOException ioe) {
+                // expected
+            }
+        }
+    }
+
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/X509CertSelectorTest.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/X509Certificate2Test.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/X509Certificate2Test.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/X509Certificate2Test.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/X509Certificate2Test.java Thu Sep 14 18:17:39 2006
@@ -1,63 +1,63 @@
-/* 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.io.InputStream;
-import java.security.cert.CertificateFactory;
-import java.security.cert.X509Certificate;
-import java.util.Iterator;
-import java.util.Vector;
-
-import tests.support.resource.Support_Resources;
-
-import junit.framework.TestCase;
-
-public class X509Certificate2Test extends junit.framework.TestCase {
-	private X509Certificate pemCert = null;
-
-	protected void setUp() throws Exception {
-
-        InputStream is = Support_Resources
-                .getResourceStream("hyts_certificate_PEM.txt");
-
-        CertificateFactory certFact = CertificateFactory.getInstance("X509");
-        pemCert = (X509Certificate) certFact.generateCertificate(is);
-    }
-
-	/**
-	 * @tests java.security.cert.X509Certificate#getExtensionValue(java.lang.String)
-	 */
-	public void test_getExtensionValueLjava_lang_String() {
-		if (pemCert != null) {
-			Vector extensionOids = new Vector();
-			extensionOids.addAll(pemCert.getCriticalExtensionOIDs());
-			extensionOids.addAll(pemCert.getNonCriticalExtensionOIDs());
-			Iterator i = extensionOids.iterator();
-			while (i.hasNext()) {
-				String oid = (String) i.next();
-				byte[] value = pemCert.getExtensionValue(oid);
-				if (value != null && value.length > 0) {
-					// check that it is an encoded as a OCTET STRING
-					assertTrue("The extension value for the oid " + oid
-							+ " was not encoded as an OCTET STRING",
-							value[0] == 0x04);
-				}
-			}
-		} else {
-			fail("Unable to obtain X509Certificate");
-		}
-	}
+/* 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.io.InputStream;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+import java.util.Iterator;
+import java.util.Vector;
+
+import tests.support.resource.Support_Resources;
+
+import junit.framework.TestCase;
+
+public class X509Certificate2Test extends junit.framework.TestCase {
+	private X509Certificate pemCert = null;
+
+	protected void setUp() throws Exception {
+
+        InputStream is = Support_Resources
+                .getResourceStream("hyts_certificate_PEM.txt");
+
+        CertificateFactory certFact = CertificateFactory.getInstance("X509");
+        pemCert = (X509Certificate) certFact.generateCertificate(is);
+    }
+
+	/**
+	 * @tests java.security.cert.X509Certificate#getExtensionValue(java.lang.String)
+	 */
+	public void test_getExtensionValueLjava_lang_String() {
+		if (pemCert != null) {
+			Vector extensionOids = new Vector();
+			extensionOids.addAll(pemCert.getCriticalExtensionOIDs());
+			extensionOids.addAll(pemCert.getNonCriticalExtensionOIDs());
+			Iterator i = extensionOids.iterator();
+			while (i.hasNext()) {
+				String oid = (String) i.next();
+				byte[] value = pemCert.getExtensionValue(oid);
+				if (value != null && value.length > 0) {
+					// check that it is an encoded as a OCTET STRING
+					assertTrue("The extension value for the oid " + oid
+							+ " was not encoded as an OCTET STRING",
+							value[0] == 0x04);
+				}
+			}
+		} else {
+			fail("Unable to obtain X509Certificate");
+		}
+	}
 }

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

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/interfaces/DSAPrivateKeyTest.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/interfaces/DSAPrivateKeyTest.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/interfaces/DSAPrivateKeyTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/interfaces/DSAPrivateKeyTest.java Thu Sep 14 18:17:39 2006
@@ -1,76 +1,76 @@
-/*
- *  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.interfaces;
-
-
-import java.math.BigInteger;
-import java.security.interfaces.DSAParams;
-import java.security.interfaces.DSAPrivateKey;
-
-import junit.framework.TestCase;
-
-/**
- * Tests for <code>DSAPrivateKey</code> class field
- * 
- */
-public class DSAPrivateKeyTest extends TestCase {
-
-    /**
-     * Constructor for DSAPrivateKeyTest.
-     * 
-     * @param arg0
-     */
-    public DSAPrivateKeyTest(String arg0) {
-        super(arg0);
-    }
-
-    /**
-     * Test for <code>serialVersionUID</code> field
-     */
-    public void testField() {
-        checkDSAPrivateKey k = new checkDSAPrivateKey();
-        assertEquals("Incorrect serialVerstionUID",
-                k.getSerVerUID(), //DSAPrivateKey.serialVersionUID 
-                7776497482533790279L);
-    }
-    
-    public class checkDSAPrivateKey implements DSAPrivateKey {
-        public String getAlgorithm() {
-            return "DSAPrivateKey";
-        }
-        public String getFormat() {
-            return "Format";
-        }
-        public byte[] getEncoded() {
-            return new byte[0];
-        }
-        public long getSerVerUID() {
-            return serialVersionUID;
-        }
-        public BigInteger getX() {
-            return null;
-        }
-        public DSAParams getParams() {
-            return null;
-        }        
-    }
-}
+/*
+ *  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.interfaces;
+
+
+import java.math.BigInteger;
+import java.security.interfaces.DSAParams;
+import java.security.interfaces.DSAPrivateKey;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests for <code>DSAPrivateKey</code> class field
+ * 
+ */
+public class DSAPrivateKeyTest extends TestCase {
+
+    /**
+     * Constructor for DSAPrivateKeyTest.
+     * 
+     * @param arg0
+     */
+    public DSAPrivateKeyTest(String arg0) {
+        super(arg0);
+    }
+
+    /**
+     * Test for <code>serialVersionUID</code> field
+     */
+    public void testField() {
+        checkDSAPrivateKey k = new checkDSAPrivateKey();
+        assertEquals("Incorrect serialVerstionUID",
+                k.getSerVerUID(), //DSAPrivateKey.serialVersionUID 
+                7776497482533790279L);
+    }
+    
+    public class checkDSAPrivateKey implements DSAPrivateKey {
+        public String getAlgorithm() {
+            return "DSAPrivateKey";
+        }
+        public String getFormat() {
+            return "Format";
+        }
+        public byte[] getEncoded() {
+            return new byte[0];
+        }
+        public long getSerVerUID() {
+            return serialVersionUID;
+        }
+        public BigInteger getX() {
+            return null;
+        }
+        public DSAParams getParams() {
+            return null;
+        }        
+    }
+}

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

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/interfaces/DSAPublicKeyTest.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/interfaces/DSAPublicKeyTest.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/interfaces/DSAPublicKeyTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/interfaces/DSAPublicKeyTest.java Thu Sep 14 18:17:39 2006
@@ -1,75 +1,75 @@
-/*
- *  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.interfaces;
-
-
-import java.math.BigInteger;
-import java.security.interfaces.DSAParams;
-import java.security.interfaces.DSAPublicKey;
-
-import junit.framework.TestCase;
-
-/**
- * Tests for <code>DSAPublicKey</code> class field
- * 
- */
-public class DSAPublicKeyTest extends TestCase {
-
-    /**
-     * Constructor for DSAPublicKeyTest.
-     * 
-     * @param arg0
-     */
-    public DSAPublicKeyTest(String arg0) {
-        super(arg0);
-    }
-
-    /**
-     * Test for <code>serialVersionUID</code> field
-     */
-    public void testField() {
-        checkDSAPublicKey k = new checkDSAPublicKey();
-        assertEquals("Incorrect serialVerstionUID",
-                k.getSerVerUID(), //DSAPublicKey.serialVersionUID 
-                1234526332779022332L);
-    }
-    public class checkDSAPublicKey implements DSAPublicKey {
-        public String getAlgorithm() {
-            return "DSAPublicKey";
-        }
-        public String getFormat() {
-            return "Format";
-        }
-        public byte[] getEncoded() {
-            return new byte[0];
-        }
-        public long getSerVerUID() {
-            return serialVersionUID;
-        }
-        public BigInteger getY() {
-            return null;
-        }
-        public DSAParams getParams() {
-            return null;
-        }        
-    }
-}
+/*
+ *  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.interfaces;
+
+
+import java.math.BigInteger;
+import java.security.interfaces.DSAParams;
+import java.security.interfaces.DSAPublicKey;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests for <code>DSAPublicKey</code> class field
+ * 
+ */
+public class DSAPublicKeyTest extends TestCase {
+
+    /**
+     * Constructor for DSAPublicKeyTest.
+     * 
+     * @param arg0
+     */
+    public DSAPublicKeyTest(String arg0) {
+        super(arg0);
+    }
+
+    /**
+     * Test for <code>serialVersionUID</code> field
+     */
+    public void testField() {
+        checkDSAPublicKey k = new checkDSAPublicKey();
+        assertEquals("Incorrect serialVerstionUID",
+                k.getSerVerUID(), //DSAPublicKey.serialVersionUID 
+                1234526332779022332L);
+    }
+    public class checkDSAPublicKey implements DSAPublicKey {
+        public String getAlgorithm() {
+            return "DSAPublicKey";
+        }
+        public String getFormat() {
+            return "Format";
+        }
+        public byte[] getEncoded() {
+            return new byte[0];
+        }
+        public long getSerVerUID() {
+            return serialVersionUID;
+        }
+        public BigInteger getY() {
+            return null;
+        }
+        public DSAParams getParams() {
+            return null;
+        }        
+    }
+}

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

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/interfaces/ECPrivateKeyTest.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/interfaces/ECPrivateKeyTest.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/interfaces/ECPrivateKeyTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/interfaces/ECPrivateKeyTest.java Thu Sep 14 18:17:39 2006
@@ -1,76 +1,76 @@
-/*
- *  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.interfaces;
-
-
-import java.math.BigInteger;
-import java.security.interfaces.ECPrivateKey;
-import java.security.spec.ECParameterSpec;
-
-import junit.framework.TestCase;
-
-/**
- * Tests for <code>ECPrivateKey</code> class field
- * 
- */
-public class ECPrivateKeyTest extends TestCase {
-
-    /**
-     * Constructor for ECPrivateKeyTest.
-     * 
-     * @param arg0
-     */
-    public ECPrivateKeyTest(String arg0) {
-        super(arg0);
-    }
-
-    /**
-     * Test for <code>serialVersionUID</code> field
-     */
-    public void testField() {
-        checkECPrivateKey k = new checkECPrivateKey();
-        assertEquals("Incorrect serialVerstionUID",
-                k.getSerVerUID(), //ECPrivateKey.serialVersionUID
-                -7896394956925609184L);
-    }
-    
-    public class checkECPrivateKey implements ECPrivateKey {
-        public String getAlgorithm() {
-            return "ECPrivateKey";
-        }
-        public String getFormat() {
-            return "Format";
-        }
-        public byte[] getEncoded() {
-            return new byte[0];
-        }        
-        public BigInteger getS() {
-            return null;
-        }
-        public ECParameterSpec getParams() {
-            return null;
-        }
-        public long getSerVerUID() {
-            return serialVersionUID;
-        }
-    }
-}
+/*
+ *  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.interfaces;
+
+
+import java.math.BigInteger;
+import java.security.interfaces.ECPrivateKey;
+import java.security.spec.ECParameterSpec;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests for <code>ECPrivateKey</code> class field
+ * 
+ */
+public class ECPrivateKeyTest extends TestCase {
+
+    /**
+     * Constructor for ECPrivateKeyTest.
+     * 
+     * @param arg0
+     */
+    public ECPrivateKeyTest(String arg0) {
+        super(arg0);
+    }
+
+    /**
+     * Test for <code>serialVersionUID</code> field
+     */
+    public void testField() {
+        checkECPrivateKey k = new checkECPrivateKey();
+        assertEquals("Incorrect serialVerstionUID",
+                k.getSerVerUID(), //ECPrivateKey.serialVersionUID
+                -7896394956925609184L);
+    }
+    
+    public class checkECPrivateKey implements ECPrivateKey {
+        public String getAlgorithm() {
+            return "ECPrivateKey";
+        }
+        public String getFormat() {
+            return "Format";
+        }
+        public byte[] getEncoded() {
+            return new byte[0];
+        }        
+        public BigInteger getS() {
+            return null;
+        }
+        public ECParameterSpec getParams() {
+            return null;
+        }
+        public long getSerVerUID() {
+            return serialVersionUID;
+        }
+    }
+}

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

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/interfaces/ECPublicKeyTest.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/interfaces/ECPublicKeyTest.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/interfaces/ECPublicKeyTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/interfaces/ECPublicKeyTest.java Thu Sep 14 18:17:39 2006
@@ -1,75 +1,75 @@
-/*
- *  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.interfaces;
-
-
-import java.security.spec.ECPoint;
-import java.security.interfaces.ECPublicKey;
-import java.security.spec.ECParameterSpec;
-
-import junit.framework.TestCase;
-
-/**
- * Tests for <code>ECPublicKey</code> class field
- * 
- */
-public class ECPublicKeyTest extends TestCase {
-
-    /**
-     * Constructor for ECPublicKeyTest.
-     * 
-     * @param arg0
-     */
-    public ECPublicKeyTest(String arg0) {
-        super(arg0);
-    }
-
-    /**
-     * Test for <code>serialVersionUID</code> field
-     */
-    public void testField() {
-        checkECPublicKey key = new checkECPublicKey();
-        assertEquals("Incorrect serialVersionUID",
-                key.getSerVerUID(), // ECPublicKey.serialVersionUID
-                -3314988629879632826L);
-    }
-    public class checkECPublicKey implements ECPublicKey {
-        public String getAlgorithm() {
-            return "ECPublicKey";
-        }
-        public String getFormat() {
-            return "Format";
-        }
-        public byte[] getEncoded() {
-            return new byte[0];
-        }        
-        public ECPoint getW() {
-            return null;
-        }
-        public ECParameterSpec getParams() {
-            return null;
-        }
-        public long getSerVerUID() {
-            return serialVersionUID;
-        }
-    }
-}
+/*
+ *  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.interfaces;
+
+
+import java.security.spec.ECPoint;
+import java.security.interfaces.ECPublicKey;
+import java.security.spec.ECParameterSpec;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests for <code>ECPublicKey</code> class field
+ * 
+ */
+public class ECPublicKeyTest extends TestCase {
+
+    /**
+     * Constructor for ECPublicKeyTest.
+     * 
+     * @param arg0
+     */
+    public ECPublicKeyTest(String arg0) {
+        super(arg0);
+    }
+
+    /**
+     * Test for <code>serialVersionUID</code> field
+     */
+    public void testField() {
+        checkECPublicKey key = new checkECPublicKey();
+        assertEquals("Incorrect serialVersionUID",
+                key.getSerVerUID(), // ECPublicKey.serialVersionUID
+                -3314988629879632826L);
+    }
+    public class checkECPublicKey implements ECPublicKey {
+        public String getAlgorithm() {
+            return "ECPublicKey";
+        }
+        public String getFormat() {
+            return "Format";
+        }
+        public byte[] getEncoded() {
+            return new byte[0];
+        }        
+        public ECPoint getW() {
+            return null;
+        }
+        public ECParameterSpec getParams() {
+            return null;
+        }
+        public long getSerVerUID() {
+            return serialVersionUID;
+        }
+    }
+}

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



Mime
View raw message