harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r397071 [1/2] - in /incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common: java/security/ java/security/cert/ java/security/spec/ org/apache/harmony/security/asn1/der/ org/apache/harmony/security/provider/cert/ tes...
Date Wed, 26 Apr 2006 03:45:32 GMT
Author: smishura
Date: Tue Apr 25 20:45:27 2006
New Revision: 397071

URL: http://svn.apache.org/viewcvs?rev=397071&view=rev
Log:
Apply patch for HARMONY-353 (improvements to junit test method usage) for security module. All security tests passed on Windows.

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/CodeSourceTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/DigestInputStreamTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/DigestOutputStreamTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/KeyPairTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CRLTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CertPathTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CertificateTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CollectionCertStoreParametersTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/LDAPCertStoreParametersTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/PKIXParametersTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/PolicyQualifierInfoTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/X509CRLSelectorTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/X509CertSelectorTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/DSAParameterSpecTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/DSAPrivateKeySpecTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/DSAPublicKeySpecTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/ECFieldF2mTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/ECFieldFpTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/MGF1ParameterSpecTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/PKCS8EncodedKeySpecTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/PSSParameterSpecTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAKeyGenParameterSpecTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAMultiPrimePrivateCrtKeySpecTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAOtherPrimeInfoTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAPrivateKeySpecTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/X509EncodedKeySpecTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/DerGeneralizedTimeEDTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/DerUTCTimeEDTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CRLImplTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CertFactoryImplTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/AccessControlExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/AlgorithmParameterGeneratorTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/AlgorithmParametersTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/CodeSourceTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/GeneralSecurityExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/InvalidKeyExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/InvalidParameterExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/KeyExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/KeyStoreExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/KeyStoreTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/PermissionCollectionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/ProviderExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/SecurityPermissionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/SecurityTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/SignatureExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/UnrecoverableKeyExceptionTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/CodeSourceTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/CodeSourceTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/CodeSourceTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/CodeSourceTest.java Tue Apr 25 20:45:27 2006
@@ -471,7 +471,7 @@
 
             // must get exactly 3 CodeSigner-s: one for the chain, and one 
             // for each of single certs
-            assertTrue(signers.length == 3);
+            assertEquals(3, signers.length);
         } finally {
             TestCertUtils.uninstall_test_x509_factory();
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/DigestInputStreamTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/DigestInputStreamTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/DigestInputStreamTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/DigestInputStreamTest.java Tue Apr 25 20:45:27 2006
@@ -161,9 +161,9 @@
                     dis.read();
                 }
                 // check that subsequent read() calls return -1 (eos)
-                assertTrue("retval1", dis.read() == -1);
-                assertTrue("retval2", dis.read() == -1);
-                assertTrue("retval3", dis.read() == -1);
+                assertEquals("retval1", -1, dis.read());
+                assertEquals("retval2", -1, dis.read());
+                assertEquals("retval3", -1, dis.read());
                 // check that 3 previous read() calls did not update digest
                 assertTrue("update",
                         Arrays.equals(dis.getMessageDigest().digest(),
@@ -331,7 +331,7 @@
     public final void testReadbyteArrayintint02()
         throws IOException {
         // check precondition
-        assertTrue(MY_MESSAGE_LEN % CHUNK_SIZE == 0);
+        assertEquals(0, MY_MESSAGE_LEN % CHUNK_SIZE);
         
         for (int ii=0; ii<algorithmName.length; ii++) {
             try {
@@ -426,9 +426,9 @@
                 // read all but EOS
                 dis.read(bArray, 0, bArray.length);
                 // check that subsequent read(byte[],int,int) calls return -1 (EOS)
-                assertTrue("retval1", dis.read(bArray, 0, 1) == -1);
-                assertTrue("retval2", dis.read(bArray, 0, bArray.length) == -1);
-                assertTrue("retval3", dis.read(bArray, 0, 1) == -1);
+                assertEquals("retval1", -1, dis.read(bArray, 0, 1));
+                assertEquals("retval2", -1, dis.read(bArray, 0, bArray.length));
+                assertEquals("retval3", -1, dis.read(bArray, 0, 1));
                 // check that 3 previous read() calls did not update digest
                 assertTrue("update",
                         Arrays.equals(dis.getMessageDigest().digest(),
@@ -454,7 +454,7 @@
     public final void testReadbyteArrayintint05()
         throws IOException {
         // check precondition
-        assertTrue(MY_MESSAGE_LEN % CHUNK_SIZE == 0);
+        assertEquals(0, MY_MESSAGE_LEN % CHUNK_SIZE);
         
         for (int ii=0; ii<algorithmName.length; ii++) {
             try {

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/DigestInputStreamTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/DigestOutputStreamTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/DigestOutputStreamTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/DigestOutputStreamTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/DigestOutputStreamTest.java Tue Apr 25 20:45:27 2006
@@ -288,7 +288,7 @@
     public final void testWritebyteArrayintint02()
         throws IOException {
         // check precondition
-        assertTrue(MY_MESSAGE_LEN % CHUNK_SIZE == 0);
+        assertEquals(0, MY_MESSAGE_LEN % CHUNK_SIZE);
         for (int k=0; k<algorithmName.length; k++) {
             try {
                 
@@ -366,7 +366,7 @@
         throws NoSuchAlgorithmException,
                IOException {
         // check precondition
-        assertTrue(MY_MESSAGE_LEN % CHUNK_SIZE == 0);
+        assertEquals(0, MY_MESSAGE_LEN % CHUNK_SIZE);
 
         for (int k=0; k<algorithmName.length; k++) {
             try {

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/DigestOutputStreamTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/KeyPairTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/KeyPairTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/KeyPairTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/KeyPairTest.java Tue Apr 25 20:45:27 2006
@@ -96,7 +96,7 @@
      */
     public final void testGetPrivate01() {
         KeyPair kp = new KeyPair(null, null);
-        assertTrue(kp.getPrivate() == null);
+        assertNull(kp.getPrivate());
     }
 
     /**
@@ -116,7 +116,7 @@
      */
     public final void testGetPublic01() {
         KeyPair kp = new KeyPair(null, null);
-        assertTrue(kp.getPublic() == null);
+        assertNull(kp.getPublic());
     }
 
     /**

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/KeyPairTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CRLTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CRLTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CRLTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CRLTest.java Tue Apr 25 20:45:27 2006
@@ -49,7 +49,7 @@
      */
     public final void testGetType01() {
         CRL crl = new MyCRL("TEST_TYPE");
-        assertTrue("TEST_TYPE".equals(crl.getType()));
+        assertEquals("TEST_TYPE", crl.getType());
     }
 
     /**
@@ -58,7 +58,7 @@
      */
     public final void testGetType02() {
         CRL crl = new MyCRL(null);
-        assertTrue(crl.getType() == null);
+        assertNull(crl.getType());
     }
 
     //

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CRLTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CertPathTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CertPathTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CertPathTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CertPathTest.java Tue Apr 25 20:45:27 2006
@@ -75,7 +75,7 @@
      * Assertion: returns cert path type
      */
     public final void testGetType() {
-        assertTrue("MyEncoding".equals(new MyCertPath(testEncoding).getType()));
+        assertEquals("MyEncoding", new MyCertPath(testEncoding).getType());
     }
 
     /**

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CertPathTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CertificateTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CertificateTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CertificateTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CertificateTest.java Tue Apr 25 20:45:27 2006
@@ -84,7 +84,7 @@
      */
     public final void testGetType() {
         Certificate c1 = new MyCertificate("TEST_TYPE", testEncoding);
-        assertTrue("TEST_TYPE".equals(c1.getType()));
+        assertEquals("TEST_TYPE", c1.getType());
     }
 
     /**

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CertificateTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CollectionCertStoreParametersTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CollectionCertStoreParametersTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CollectionCertStoreParametersTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CollectionCertStoreParametersTest.java Tue Apr 25 20:45:27 2006
@@ -198,7 +198,7 @@
         CollectionCertStoreParameters cp =
             new CollectionCertStoreParameters();
         String s = cp.toString();
-        assertTrue(s != null);
+        assertNotNull(s);
     }
 
     /**
@@ -220,7 +220,7 @@
      */
     public final void testGetCollection01() {
         CollectionCertStoreParameters cp = new CollectionCertStoreParameters();
-        assertTrue(cp.getCollection() != null);
+        assertNotNull(cp.getCollection());
     }
 
     /**
@@ -231,7 +231,7 @@
         Vector certificates = new Vector();
         CollectionCertStoreParameters cp =
             new CollectionCertStoreParameters(certificates);
-        assertTrue(cp.getCollection() != null);
+        assertNotNull(cp.getCollection());
     }
 
 }

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/CollectionCertStoreParametersTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/LDAPCertStoreParametersTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/LDAPCertStoreParametersTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/LDAPCertStoreParametersTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/LDAPCertStoreParametersTest.java Tue Apr 25 20:45:27 2006
@@ -60,8 +60,8 @@
      */
     public final void testLDAPCertStoreParameters02() {
         LDAPCertStoreParameters cp = new LDAPCertStoreParameters();
-        assertTrue("host", "localhost".equals(cp.getServerName()));
-        assertTrue("port", cp.getPort() == 389);
+        assertEquals("host", "localhost", cp.getServerName());
+        assertEquals("port", 389, cp.getPort());
     }
 
     /**
@@ -84,7 +84,7 @@
         String serverName = "myhost";
         LDAPCertStoreParameters cp = new LDAPCertStoreParameters(serverName);
         assertTrue("host", serverName.equals(cp.getServerName()));
-        assertTrue("port", cp.getPort() == 389);
+        assertEquals("port", 389, cp.getPort());
     }
 
     /**

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/LDAPCertStoreParametersTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/PKIXParametersTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/PKIXParametersTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/PKIXParametersTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/PKIXParametersTest.java Tue Apr 25 20:45:27 2006
@@ -942,7 +942,7 @@
         // check that we have two PKIXCertPathCheckers and
         // they are in right order
         List l1 = p.getCertPathCheckers();
-        assertTrue("listSize", l1.size() == 2);
+        assertEquals("listSize", 2, l1.size());
         assertFalse("order1",
                 ((PKIXCertPathChecker)l1.get(0)).isForwardCheckingSupported());
         assertTrue("order2",
@@ -969,7 +969,7 @@
         p.addCertPathChecker(null);
         // check that we have one PKIXCertPathChecker
         List l1 = p.getCertPathCheckers();
-        assertTrue("listSize", l1.size() == 1);
+        assertEquals("listSize", 1, l1.size());
     }
 
     /**
@@ -997,7 +997,7 @@
         // above modification
         List l = p.getCertPathCheckers();
         PKIXCertPathChecker cpc1 = (PKIXCertPathChecker)l.get(0);
-        assertTrue("listSize", l.size() == 1);
+        assertEquals("listSize", 1, l.size());
         assertFalse("isCopied", cpc1.isForwardCheckingSupported());
     }
 
@@ -1059,7 +1059,7 @@
 
         PKIXParameters p = new PKIXParameters(taSet);
         p.setDate(new Date(555L));
-        assertTrue(p.getDate().getTime() == 555L);
+        assertEquals(555L, p.getDate().getTime());
     }
 
     /**
@@ -1096,7 +1096,7 @@
         toBeSet.setTime(0L);
         // check that internal Date has not been
         // changed by the above modification
-        assertTrue(p.getDate().getTime() == 555L);
+        assertEquals(555L, p.getDate().getTime());
     }
 
     /**
@@ -1154,7 +1154,7 @@
         s.add("1.2.3.4.5.6.7");
         PKIXParameters p = new PKIXParameters(taSet);
         p.setInitialPolicies(s);
-        assertTrue(p.getInitialPolicies().size() == 1);
+        assertEquals(1, p.getInitialPolicies().size());
     }
 
     /**
@@ -1208,7 +1208,7 @@
         s.clear();
         // check that set maintained internally has
         // not been changed by the above modification
-        assertTrue(p.getInitialPolicies().size() == 2);
+        assertEquals(2, p.getInitialPolicies().size());
     }
 
     /**

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/PKIXParametersTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/PolicyQualifierInfoTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/PolicyQualifierInfoTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/PolicyQualifierInfoTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/PolicyQualifierInfoTest.java Tue Apr 25 20:45:27 2006
@@ -249,7 +249,7 @@
         // pass valid array
         PolicyQualifierInfo i = new PolicyQualifierInfo(encoding);
         // get OID as String and check it
-        assertTrue("1.3.6.1.5.5.7.2.1".equals(i.getPolicyQualifierId()));
+        assertEquals("1.3.6.1.5.5.7.2.1", i.getPolicyQualifierId());
 
         // get valid encoding
         encoding = getDerEncoding();
@@ -260,7 +260,7 @@
         encoding[9] = (byte)0x87;
         i = new PolicyQualifierInfo(encoding);
         // get OID as String and check it
-        assertTrue("1.3.98437.82818.1".equals(i.getPolicyQualifierId()));
+        assertEquals("1.3.98437.82818.1", i.getPolicyQualifierId());
     }
 
     /**

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/PolicyQualifierInfoTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/X509CRLSelectorTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/X509CRLSelectorTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/X509CRLSelectorTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/X509CRLSelectorTest.java Tue Apr 25 20:45:27 2006
@@ -430,8 +430,8 @@
         X500Principal iss1 = new X500Principal("O=First Org.");
         X500Principal iss2 = new X500Principal("O=Second Org.");
         X500Principal iss3 = new X500Principal("O=Third Org.");
-        assertTrue("The collection should be null.",
-                                        selector.getIssuers() == null);
+        assertNull("The collection should be null.",
+                                        selector.getIssuers());
         selector.addIssuer(iss1);
         selector.addIssuer(iss2);
         Collection result = selector.getIssuers();
@@ -459,8 +459,8 @@
             //manually obtained DER encoding of "O=Second Org." issuer name;
             {48, 22, 49, 20, 48, 18, 6, 3, 85, 4, 10, 19, 11,
             83, 101, 99, 111, 110, 100, 32, 79, 114, 103, 46};
-        assertTrue("The collection should be null.",
-                                        selector.getIssuerNames() == null);
+        assertNull("The collection should be null.",
+                                        selector.getIssuerNames());
         try {
             selector.addIssuerName(iss1);
             selector.addIssuerName(iss2);
@@ -469,8 +469,8 @@
             fail("Unexpected IOException was thrown.");
         }
         Collection result = selector.getIssuerNames();
-        assertTrue("The collection should contain all of the specified DNs.",
-                                                result.size() == 2);
+        assertEquals("The collection should contain all of the specified DNs.",
+                                                2, result.size());
     }
 
     /**
@@ -480,8 +480,8 @@
      */
     public void testGetMinCRL() {
         X509CRLSelector selector = new X509CRLSelector();
-        assertTrue("Initially the minCRL should be null.",
-                                        selector.getMinCRL() == null);
+        assertNull("Initially the minCRL should be null.",
+                                        selector.getMinCRL());
         BigInteger minCRL = new BigInteger("10000");
         selector.setMinCRLNumber(minCRL);
         assertTrue("The result should be equal to specified.",
@@ -495,8 +495,8 @@
      */
     public void testGetMaxCRL() {
         X509CRLSelector selector = new X509CRLSelector();
-        assertTrue("Initially the maxCRL should be null.",
-                                        selector.getMaxCRL() == null);
+        assertNull("Initially the maxCRL should be null.",
+                                        selector.getMaxCRL());
         BigInteger maxCRL = new BigInteger("10000");
         selector.setMaxCRLNumber(maxCRL);
         assertTrue("The result should be equal to specified.",
@@ -510,8 +510,8 @@
      */
     public void testGetDateAndTime() {
         X509CRLSelector selector = new X509CRLSelector();
-        assertTrue("Initially the dateAndTime criteria should be null.",
-                                        selector.getDateAndTime() == null);
+        assertNull("Initially the dateAndTime criteria should be null.",
+                                        selector.getDateAndTime());
         Date date = new Date(200);
         selector.setDateAndTime(date);
         assertTrue("The result should be equal to specified.",
@@ -576,8 +576,7 @@
         selector.setMaxCRLNumber(maxCRL);
         selector.setDateAndTime(date);
 
-        assertTrue("The result should not be null.", 
-                selector.toString() != null);
+        assertNotNull("The result should not be null.", selector.toString());
     }
 
     public static Test suite() {

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/X509CRLSelectorTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/X509CertSelectorTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/X509CertSelectorTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/X509CertSelectorTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/cert/X509CertSelectorTest.java Tue Apr 25 20:45:27 2006
@@ -2860,8 +2860,8 @@
         selector.setMatchAllSubjectAltNames(true);
         selector.setPolicy(new HashSet(Arrays.asList(policies)));
 
-        assertTrue("The result should not be null.", 
-                selector.toString() != null);
+        assertNotNull("The result should not be null.", 
+                selector.toString());
     }
 
     /**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/DSAParameterSpecTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/DSAParameterSpecTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/DSAParameterSpecTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/DSAParameterSpecTest.java Tue Apr 25 20:45:27 2006
@@ -61,7 +61,7 @@
                 new BigInteger("2"),
 				new BigInteger("3"));
         
-        assertTrue(dps.getG().intValue() == 3);        
+        assertEquals(3, dps.getG().intValue());
     }
 
     /**
@@ -73,7 +73,7 @@
                 new BigInteger("2"),
                 new BigInteger("3"));
         
-        assertTrue(dps.getP().intValue() == 1);        
+        assertEquals(1, dps.getP().intValue());
     }
 
     /**
@@ -85,6 +85,6 @@
                 new BigInteger("2"),
                 new BigInteger("3"));
         
-        assertTrue(dps.getQ().intValue() == 2);        
+        assertEquals(2, dps.getQ().intValue());
     }
 }

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/DSAParameterSpecTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/DSAPrivateKeySpecTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/DSAPrivateKeySpecTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/DSAPrivateKeySpecTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/DSAPrivateKeySpecTest.java Tue Apr 25 20:45:27 2006
@@ -63,7 +63,7 @@
                 new BigInteger("3"),
                 new BigInteger("4"));
         
-        assertTrue(dpks.getG().intValue() == 4);
+        assertEquals(4, dpks.getG().intValue());
     }
 
     /**
@@ -76,7 +76,7 @@
                 new BigInteger("3"),
                 new BigInteger("4"));
         
-        assertTrue(dpks.getP().intValue() == 2);
+        assertEquals(2, dpks.getP().intValue());
     }
 
     /**
@@ -89,7 +89,7 @@
                 new BigInteger("3"),
                 new BigInteger("4"));
         
-        assertTrue(dpks.getQ().intValue() == 3);
+        assertEquals(3, dpks.getQ().intValue());
     }
 
     /**
@@ -102,7 +102,7 @@
                 new BigInteger("3"),
                 new BigInteger("4"));
         
-        assertTrue(dpks.getX().intValue() == 1);
+        assertEquals(1, dpks.getX().intValue());
     }
 
 }

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/DSAPrivateKeySpecTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/DSAPublicKeySpecTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/DSAPublicKeySpecTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/DSAPublicKeySpecTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/DSAPublicKeySpecTest.java Tue Apr 25 20:45:27 2006
@@ -63,7 +63,7 @@
                 new BigInteger("3"), // q
                 new BigInteger("4"));// g
         
-        assertTrue(dpks.getG().intValue() == 4);
+        assertEquals(4, dpks.getG().intValue());
     }
 
     /**
@@ -76,7 +76,7 @@
                 new BigInteger("3"), // q
                 new BigInteger("4"));// g
         
-        assertTrue(dpks.getP().intValue() == 2);
+        assertEquals(2, dpks.getP().intValue());
     }
 
     /**
@@ -89,7 +89,7 @@
                 new BigInteger("3"), // q
                 new BigInteger("4"));// g
         
-        assertTrue(dpks.getQ().intValue() == 3);
+        assertEquals(3, dpks.getQ().intValue());
     }
 
     /**
@@ -102,6 +102,6 @@
                 new BigInteger("3"), // q
                 new BigInteger("4"));// g
         
-        assertTrue(dpks.getY().intValue() == 1);
+        assertEquals(1, dpks.getY().intValue());
     }
 }

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/DSAPublicKeySpecTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/ECFieldF2mTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/ECFieldF2mTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/ECFieldF2mTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/ECFieldF2mTest.java Tue Apr 25 20:45:27 2006
@@ -557,7 +557,7 @@
      * Assertion: returns m value for <code>ECFieldF2m</code>
      */
     public final void testGetFieldSize() {
-        assertTrue(new ECFieldF2m(2000).getFieldSize() == 2000);
+        assertEquals(2000, new ECFieldF2m(2000).getFieldSize());
     }
 
     /**
@@ -566,7 +566,7 @@
      * Assertion: returns m value for <code>ECFieldF2m</code>
      */
     public final void testGetM() {
-        assertTrue(new ECFieldF2m(2000).getM() == 2000);
+        assertEquals(2000, new ECFieldF2m(2000).getM());
     }
 
     /**
@@ -589,7 +589,7 @@
      * Assertion: returns null for normal basis
      */
     public final void testGetMidTermsOfReductionPolynomial02() {
-        assertTrue(new ECFieldF2m(2000).getMidTermsOfReductionPolynomial() == null);
+        assertNull(new ECFieldF2m(2000).getMidTermsOfReductionPolynomial());
     }
 
     /**
@@ -620,7 +620,7 @@
      * Assertion: returns null for normal basis
      */
     public final void testGetReductionPolynomial02() {
-        assertTrue(new ECFieldF2m(2000).getReductionPolynomial() == null);
+        assertNull(new ECFieldF2m(2000).getReductionPolynomial());
     }
 
     /**

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/ECFieldF2mTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/ECFieldFpTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/ECFieldFpTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/ECFieldFpTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/ECFieldFpTest.java Tue Apr 25 20:45:27 2006
@@ -142,7 +142,7 @@
      * Assertion: returns field size in bits which is prime size
      */
     public final void testGetFieldSize() {
-        assertTrue(new ECFieldFp(BigInteger.valueOf(23L)).getFieldSize() == 5);
+        assertEquals(5, new ECFieldFp(BigInteger.valueOf(23L)).getFieldSize());
     }
 
     /**

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/ECFieldFpTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/MGF1ParameterSpecTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/MGF1ParameterSpecTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/MGF1ParameterSpecTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/MGF1ParameterSpecTest.java Tue Apr 25 20:45:27 2006
@@ -83,9 +83,9 @@
      * digest used by the mask generation function
      */
     public final void testFieldsGetDigestAlgorithm() {
-        assertTrue("SHA-1".equals(MGF1ParameterSpec.SHA1.getDigestAlgorithm()));
-        assertTrue("SHA-256".equals(MGF1ParameterSpec.SHA256.getDigestAlgorithm()));
-        assertTrue("SHA-384".equals(MGF1ParameterSpec.SHA384.getDigestAlgorithm()));
-        assertTrue("SHA-512".equals(MGF1ParameterSpec.SHA512.getDigestAlgorithm()));
+        assertEquals("SHA-1", MGF1ParameterSpec.SHA1.getDigestAlgorithm());
+        assertEquals("SHA-256", MGF1ParameterSpec.SHA256.getDigestAlgorithm());
+        assertEquals("SHA-384", MGF1ParameterSpec.SHA384.getDigestAlgorithm());
+        assertEquals("SHA-512", MGF1ParameterSpec.SHA512.getDigestAlgorithm());
     }
 }

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/MGF1ParameterSpecTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/PKCS8EncodedKeySpecTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/PKCS8EncodedKeySpecTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/PKCS8EncodedKeySpecTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/PKCS8EncodedKeySpecTest.java Tue Apr 25 20:45:27 2006
@@ -80,7 +80,7 @@
         
         PKCS8EncodedKeySpec meks = new PKCS8EncodedKeySpec(encodedKey);
         
-        assertTrue("PKCS#8".equals(meks.getFormat()));
+        assertEquals("PKCS#8", meks.getFormat());
     }
     
     /**

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/PKCS8EncodedKeySpecTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/PSSParameterSpecTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/PSSParameterSpecTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/PSSParameterSpecTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/PSSParameterSpecTest.java Tue Apr 25 20:45:27 2006
@@ -165,7 +165,7 @@
     public final void testGetDigestAlgorithm() {
         PSSParameterSpec pssps = new PSSParameterSpec("SHA-1", "MGF1",
                 MGF1ParameterSpec.SHA1, 20, 1);
-        assertTrue("SHA-1".equals(pssps.getDigestAlgorithm()));
+        assertEquals("SHA-1", pssps.getDigestAlgorithm());
     }
 
     /**
@@ -175,7 +175,7 @@
     public final void testGetMGFAlgorithm() {
         PSSParameterSpec pssps = new PSSParameterSpec("SHA-1", "MGF1",
                 MGF1ParameterSpec.SHA1, 20, 1);
-        assertTrue("MGF1".equals(pssps.getMGFAlgorithm()));
+        assertEquals("MGF1", pssps.getMGFAlgorithm());
     }
 
     /**
@@ -197,7 +197,7 @@
     public final void testGetMGFParameters02() {
         PSSParameterSpec pssps = new PSSParameterSpec("SHA-1", "MGF1",
                 null, 20, 1);
-        assertTrue(pssps.getMGFParameters() == null);
+        assertNull(pssps.getMGFParameters());
     }
 
 
@@ -207,7 +207,7 @@
      */
     public final void testGetSaltLength() {
         PSSParameterSpec pssps = new PSSParameterSpec(20);
-        assertTrue(pssps.getSaltLength() == 20);
+        assertEquals(20, pssps.getSaltLength());
     }
 
     /**
@@ -217,7 +217,7 @@
     public final void testGetTrailerField() {
         PSSParameterSpec pssps = new PSSParameterSpec("SHA-1", "MGF1",
                 MGF1ParameterSpec.SHA1, 20, 1);
-        assertTrue(pssps.getTrailerField() == 1);
+        assertEquals(1, pssps.getTrailerField());
     }
 
     /**
@@ -225,7 +225,7 @@
      * Assertion: default message digest algorithm name is "SHA-1"
      */
     public final void testDEFAULTmdName() {
-        assertTrue("SHA-1".equals(PSSParameterSpec.DEFAULT.getDigestAlgorithm()));        
+        assertEquals("SHA-1", PSSParameterSpec.DEFAULT.getDigestAlgorithm());
     }
 
     /**
@@ -233,7 +233,7 @@
      * Assertion: default mask generation function algorithm name is "MGF1"
      */
     public final void testDEFAULTmgfName() {
-        assertTrue("MGF1".equals(PSSParameterSpec.DEFAULT.getMGFAlgorithm()));        
+        assertEquals("MGF1", PSSParameterSpec.DEFAULT.getMGFAlgorithm());
     }
 
     /**
@@ -250,7 +250,7 @@
      * Assertion: default salt length value is 20
      */
     public final void testDEFAULTsaltLen() {
-        assertTrue(PSSParameterSpec.DEFAULT.getSaltLength() == 20);        
+        assertEquals(20, PSSParameterSpec.DEFAULT.getSaltLength());
     }
 
     /**
@@ -258,6 +258,6 @@
      * Assertion: default trailer field value is 1
      */
     public final void testDEFAULTtrailerField() {
-        assertTrue(PSSParameterSpec.DEFAULT.getTrailerField() == 1);        
+        assertEquals(1, PSSParameterSpec.DEFAULT.getTrailerField());
     }
 }

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/PSSParameterSpecTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAKeyGenParameterSpecTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAKeyGenParameterSpecTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAKeyGenParameterSpecTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAKeyGenParameterSpecTest.java Tue Apr 25 20:45:27 2006
@@ -58,7 +58,7 @@
     public final void testGetKeysize() {
         RSAKeyGenParameterSpec rkgps =
             new RSAKeyGenParameterSpec(512, BigInteger.valueOf(0L));
-        assertTrue(rkgps.getKeysize() == 512);
+        assertEquals(512, rkgps.getKeysize());
     }
 
     /**
@@ -68,7 +68,7 @@
     public final void testGetPublicExponent() {
         RSAKeyGenParameterSpec rkgps =
             new RSAKeyGenParameterSpec(512, BigInteger.valueOf(0L));
-        assertTrue(rkgps.getPublicExponent().intValue() == 0);
+        assertEquals(0, rkgps.getPublicExponent().intValue());
     }
     
     /**
@@ -76,7 +76,7 @@
      * Assertion: the public exponent value F0 = 3
      */
     public final void testF0Value() {
-        assertTrue(RSAKeyGenParameterSpec.F0.intValue() == 3);        
+        assertEquals(3, RSAKeyGenParameterSpec.F0.intValue());
     }
     
     /**
@@ -84,7 +84,7 @@
      * Assertion: the public exponent value F0 = 65537
      */
     public final void testF4Value() {
-        assertTrue(RSAKeyGenParameterSpec.F4.intValue() == 65537);        
+        assertEquals(65537, RSAKeyGenParameterSpec.F4.intValue());
     }
 
 }

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAKeyGenParameterSpecTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAMultiPrimePrivateCrtKeySpecTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAMultiPrimePrivateCrtKeySpecTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAMultiPrimePrivateCrtKeySpecTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAMultiPrimePrivateCrtKeySpecTest.java Tue Apr 25 20:45:27 2006
@@ -565,7 +565,7 @@
                     BigInteger.ONE,
                     BigInteger.ONE,
                     null);
-        assertTrue(ks.getOtherPrimeInfo() == null);
+        assertNull(ks.getOtherPrimeInfo());
     }
 
     //

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAMultiPrimePrivateCrtKeySpecTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAOtherPrimeInfoTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAOtherPrimeInfoTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAOtherPrimeInfoTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAOtherPrimeInfoTest.java Tue Apr 25 20:45:27 2006
@@ -118,7 +118,7 @@
             new RSAOtherPrimeInfo(BigInteger.valueOf(1L),
                                   BigInteger.valueOf(2L),
                                   BigInteger.valueOf(3L));
-        assertTrue(ropi.getCrtCoefficient().longValue() == 3L);
+        assertEquals(3L, ropi.getCrtCoefficient().longValue());
     }
 
     /**
@@ -130,7 +130,7 @@
             new RSAOtherPrimeInfo(BigInteger.valueOf(1L),
                                   BigInteger.valueOf(2L),
                                   BigInteger.valueOf(3L));
-        assertTrue(ropi.getPrime().longValue() == 1L);
+        assertEquals(1L, ropi.getPrime().longValue());
     }
 
     /**
@@ -142,7 +142,7 @@
             new RSAOtherPrimeInfo(BigInteger.valueOf(1L),
                                   BigInteger.valueOf(2L),
                                   BigInteger.valueOf(3L));
-        assertTrue(ropi.getExponent().longValue() == 2L);
+        assertEquals(2L, ropi.getExponent().longValue());
     }
 
 }

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAOtherPrimeInfoTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAPrivateKeySpecTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAPrivateKeySpecTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAPrivateKeySpecTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAPrivateKeySpecTest.java Tue Apr 25 20:45:27 2006
@@ -59,7 +59,7 @@
         RSAPrivateKeySpec rpks =
             new RSAPrivateKeySpec(BigInteger.valueOf(1234567890L),
                                   BigInteger.valueOf(3L));
-        assertTrue(rpks.getModulus().longValue() == 1234567890L);
+        assertEquals(1234567890L, rpks.getModulus().longValue());
     }
 
     /**
@@ -70,7 +70,7 @@
         RSAPrivateKeySpec rpks =
             new RSAPrivateKeySpec(BigInteger.valueOf(1234567890L),
                                   BigInteger.valueOf(3L));
-        assertTrue(rpks.getPrivateExponent().longValue() == 3L);
+        assertEquals(3L, rpks.getPrivateExponent().longValue());
     }
 
 }

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/RSAPrivateKeySpecTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/X509EncodedKeySpecTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/X509EncodedKeySpecTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/X509EncodedKeySpecTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/X509EncodedKeySpecTest.java Tue Apr 25 20:45:27 2006
@@ -80,7 +80,7 @@
         
         X509EncodedKeySpec meks = new X509EncodedKeySpec(encodedKey);
         
-        assertTrue("X.509".equals(meks.getFormat()));
+        assertEquals("X.509", meks.getFormat());
     }
     
     /**

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/java/security/spec/X509EncodedKeySpecTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/DerGeneralizedTimeEDTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/DerGeneralizedTimeEDTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/DerGeneralizedTimeEDTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/DerGeneralizedTimeEDTest.java Tue Apr 25 20:45:27 2006
@@ -61,21 +61,21 @@
         encoded =
             new DerOutputStream(gTime, myDate).encoded;
         rep = new String(encoded, 2, encoded[1] & 0xff);
-        assertTrue("2 fraction", "20041202093934.18Z".equals(rep));
+        assertEquals("2 fraction", "20041202093934.18Z", rep);
 
         // 1 digit fractional seconds (last 2 0s must be trimmed out)
         myDate = getGmtDate(1101980374100L);
         encoded =
             new DerOutputStream(gTime, myDate).encoded;
         rep = new String(encoded, 2, encoded[1] & 0xff);
-        assertTrue("1 fraction", "20041202093934.1Z".equals(rep));
+        assertEquals("1 fraction", "20041202093934.1Z", rep);
 
         // no fractional seconds (last 3 0s and "." must be trimmed out)
         myDate = getGmtDate(1101980374000L);
         encoded =
             new DerOutputStream(gTime, myDate).encoded;
         rep = new String(encoded, 2, encoded[1] & 0xff);
-        assertTrue("no fraction", "20041202093934Z".equals(rep));
+        assertEquals("no fraction", "20041202093934Z", rep);
 
         // midnight
         SimpleDateFormat sdf =
@@ -85,7 +85,7 @@
         encoded =
             new DerOutputStream(gTime, myDate).encoded;
         rep = new String(encoded, 2, encoded[1] & 0xff);
-        assertTrue("midnight", "20040606000000Z".equals(rep));
+        assertEquals("midnight", "20040606000000Z", rep);
     }
 
     /**

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/DerGeneralizedTimeEDTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/DerUTCTimeEDTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/DerUTCTimeEDTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/DerUTCTimeEDTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/DerUTCTimeEDTest.java Tue Apr 25 20:45:27 2006
@@ -56,7 +56,7 @@
         byte[] encoded =
             new DerOutputStream(uTime, myDate).encoded;
         String rep = new String(encoded, 2, encoded[1] & 0xff);
-        assertTrue("no fraction", "041202093934Z".equals(rep));
+        assertEquals("no fraction", "041202093934Z", rep);
 
         // midnight
         SimpleDateFormat sdf =
@@ -66,7 +66,7 @@
         encoded =
             new DerOutputStream(uTime, myDate).encoded;
         rep = new String(encoded, 2, encoded[1] & 0xff);
-        assertTrue("midnight", "040606000000Z".equals(rep));
+        assertEquals("midnight", "040606000000Z", rep);
     }
 
     /**
@@ -102,7 +102,7 @@
         ? new DerInputStream(new ByteArrayInputStream(encoded))
         : new DerInputStream(encoded);
         // the difference only fractional-seconds
-        assertTrue((myDate.getTime()-((Date)uTime.decode(dis)).getTime()) == 187);
+        assertEquals(187, (myDate.getTime()-((Date)uTime.decode(dis)).getTime()));
 
         // midnight
         myDate = new SimpleDateFormat("MM.dd.yyyy HH:mm").

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/asn1/der/DerUTCTimeEDTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CRLImplTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CRLImplTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CRLImplTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CRLImplTest.java Tue Apr 25 20:45:27 2006
@@ -280,7 +280,7 @@
      * getVersion() method testing.
      */
     public void testGetVersion() {
-        assertTrue("Incorrect version value", crl.getVersion() == 2);
+        assertEquals("Incorrect version value", 2, crl.getVersion());
     }
     
     /**

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CRLImplTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CertFactoryImplTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CertFactoryImplTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CertFactoryImplTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CertFactoryImplTest.java Tue Apr 25 20:45:27 2006
@@ -98,8 +98,8 @@
             new ByteArrayInputStream(
                     CertFactoryTestData.getCertEncoding());
         try {
-            assertTrue("The size of collection is not correct",
-                    certFactory.engineGenerateCertificates(bais).size() == 2);
+            assertEquals("The size of collection is not correct",
+                    2, certFactory.engineGenerateCertificates(bais).size());
         } catch (CertificateException e) {
             e.printStackTrace();
             fail("Unexpected CertificateException: " + e.getMessage());
@@ -109,8 +109,8 @@
         bais = new ByteArrayInputStream(
                 CertFactoryTestData.getBase64CertEncoding());
         try {
-            assertTrue("The size of collection is not correct",
-                    certFactory.engineGenerateCertificates(bais).size() == 2);
+            assertEquals("The size of collection is not correct",
+                    2, certFactory.engineGenerateCertificates(bais).size());
         } catch (CertificateException e) {
             e.printStackTrace();
             fail("Unexpected CertificateException: " + e.getMessage());
@@ -157,8 +157,8 @@
             new ByteArrayInputStream(
                     CertFactoryTestData.getCRLEncoding());
         try {
-            assertTrue("The size of collection is not correct",
-                    certFactory.engineGenerateCRLs(bais).size() == 2);
+            assertEquals("The size of collection is not correct",
+                    2, certFactory.engineGenerateCRLs(bais).size());
         } catch (CRLException e) {
             e.printStackTrace();
             fail("Unexpected CRLException: " + e.getMessage());

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CertFactoryImplTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/AccessControlExceptionTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/AccessControlExceptionTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/AccessControlExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/AccessControlExceptionTest.java Tue Apr 25 20:45:27 2006
@@ -59,9 +59,9 @@
 		// Test for method java.security.Permission
 		// java.security.AccessControlException.getPermission()
 		// make sure getPermission returns null when it's not set
-		assertTrue(
+		assertNull(
 				"getPermission should have returned null if no permission was set",
-				acException.getPermission() == null);
+				acException.getPermission());
 		assertTrue(
 				"getPermission should have returned the permission we assigned to it",
 				acException1.getPermission() == filePermission);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/AlgorithmParameterGeneratorTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/AlgorithmParameterGeneratorTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/AlgorithmParameterGeneratorTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/AlgorithmParameterGeneratorTest.java Tue Apr 25 20:45:27 2006
@@ -52,7 +52,7 @@
 		// java.security.AlgorithmParameterGenerator.getAlgorithm()
 		String alg = AlgorithmParameterGenerator.getInstance("DSA")
 				.getAlgorithm();
-		assertTrue("getAlgorithm ok", alg.equals("DSA"));
+		assertEquals("getAlgorithm ok", "DSA", alg);
 	}
 
 	/**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/AlgorithmParametersTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/AlgorithmParametersTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/AlgorithmParametersTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/AlgorithmParametersTest.java Tue Apr 25 20:45:27 2006
@@ -124,7 +124,7 @@
 
        		DSAParameterSpec spec = (DSAParameterSpec) params
        				.getParameterSpec(dsaps.getClass());
-       		assertTrue("param spec is null", spec != null);
+       		assertNotNull("param spec is null", spec);
        		assertTrue("p is wrong ", spec.getP().equals(BigInteger.ONE));
        		assertTrue("q is wrong ", spec.getQ().equals(BigInteger.ONE));
        		assertTrue("g is wrong ", spec.getG().equals(BigInteger.ONE));
@@ -138,7 +138,7 @@
 		// java.security.AlgorithmParameters.getProvider()
 		try {
 			Provider p = AlgorithmParameters.getInstance("DSA").getProvider();
-			assertTrue("provider is null", p != null);
+			assertNotNull("provider is null", p);
 		} catch (NoSuchAlgorithmException e) {
 			fail("getInstance did not find algorithm");
 		}
@@ -154,7 +154,7 @@
 			params.init(new DSAParameterSpec(BigInteger.ONE, BigInteger.ONE,
 					BigInteger.ONE));
 			byte[] encoded = params.getEncoded();
-			assertTrue("encoded spec is null", encoded != null);
+			assertNotNull("encoded spec is null", encoded);
 			AlgorithmParameters params2 = AlgorithmParameters
 					.getInstance("DSA");
 			params2.init(encoded);
@@ -181,7 +181,7 @@
 			params.init(new DSAParameterSpec(BigInteger.ONE, BigInteger.ONE,
 					BigInteger.ONE));
 			byte[] encoded = params.getEncoded();
-			assertTrue("encoded spec is null", encoded != null);
+			assertNotNull("encoded spec is null", encoded);
 			AlgorithmParameters params2 = AlgorithmParameters
 					.getInstance("DSA");
 			params2.init(encoded, "ASN.1");
@@ -201,7 +201,7 @@
 			params.init(new DSAParameterSpec(BigInteger.ONE, BigInteger.ONE,
 					BigInteger.ONE));
 			byte[] encoded = params.getEncoded();
-			assertTrue("encoded spec is null", encoded != null);
+			assertNotNull("encoded spec is null", encoded);
 			params.init(encoded, "DOUGLASMAWSON");
 			fail("unsupported format should have raised IOException");
 		} catch (NoSuchAlgorithmException e) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/CodeSourceTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/CodeSourceTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/CodeSourceTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/CodeSourceTest.java Tue Apr 25 20:45:27 2006
@@ -62,8 +62,8 @@
 	public void test_getCertificates() throws Exception {
        		CodeSource cs = new CodeSource(new java.net.URL("file:///test"),
        				(Certificate[]) null);
-       		assertTrue("Should have gotten null certificate list.", cs
-       				.getCertificates() == null);
+       		assertNull("Should have gotten null certificate list.", cs
+       				.getCertificates());
 	}
 
 	/**
@@ -73,8 +73,8 @@
 		// Test for method java.net.URL java.security.CodeSource.getLocation()
        		CodeSource cs = new CodeSource(new java.net.URL("file:///test"),
        				(Certificate[]) null);
-       		assertTrue("Did not get expected location!", cs.getLocation()
-       				.toString().equals("file:/test"));
+       		assertEquals("Did not get expected location!", "file:/test", cs.getLocation()
+       				.toString());
 	}
 
 	/**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/GeneralSecurityExceptionTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/GeneralSecurityExceptionTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/GeneralSecurityExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/GeneralSecurityExceptionTest.java Tue Apr 25 20:45:27 2006
@@ -26,8 +26,8 @@
 		// Test for method java.security.GeneralSecurityException()
 		GeneralSecurityException e = new GeneralSecurityException();
 		assertNotNull("Constructor returned null instance", e);
-		assertTrue("Failed toString test for constructed instance", e
-				.toString().equals("java.security.GeneralSecurityException"));
+		assertEquals("Failed toString test for constructed instance", "java.security.GeneralSecurityException", e
+				.toString());
 	}
 
 	/**
@@ -39,8 +39,8 @@
 		GeneralSecurityException e = new GeneralSecurityException(
 				"test message");
 		assertNotNull("Constructor returned null instance", e);
-		assertTrue("Failed toString test for constructed instance", e
-				.toString().equals(
-						"java.security.GeneralSecurityException: test message"));
+		assertEquals("Failed toString test for constructed instance", 
+						"java.security.GeneralSecurityException: test message", e
+				.toString());
 	}
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/InvalidKeyExceptionTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/InvalidKeyExceptionTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/InvalidKeyExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/InvalidKeyExceptionTest.java Tue Apr 25 20:45:27 2006
@@ -26,8 +26,8 @@
 		// Test for method java.security.InvalidKeyException()
 		InvalidKeyException e = new InvalidKeyException();
 		assertNotNull("Constructor returned a null", e);
-		assertTrue("Failed toString test for constructed instance", e
-				.toString().equals("java.security.InvalidKeyException"));
+		assertEquals("Failed toString test for constructed instance", "java.security.InvalidKeyException", e
+				.toString());
 	}
 
 	/**
@@ -37,8 +37,8 @@
 		// Test for method java.security.InvalidKeyException(java.lang.String)
 		InvalidKeyException e = new InvalidKeyException("test message");
 		assertNotNull("Constructor returned a null", e);
-		assertTrue("Failed toString test for constructed instance", e
-				.toString().equals(
-						"java.security.InvalidKeyException: test message"));
+		assertEquals("Failed toString test for constructed instance", 
+						"java.security.InvalidKeyException: test message", e
+				.toString());
 	}
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/InvalidParameterExceptionTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/InvalidParameterExceptionTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/InvalidParameterExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/InvalidParameterExceptionTest.java Tue Apr 25 20:45:27 2006
@@ -25,8 +25,8 @@
 	public void test_Constructor() {
 		// Test for method java.security.InvalidParameterException()
 		InvalidParameterException e = new InvalidParameterException();
-		assertTrue("Failed toString test for constructed instance", e
-				.toString().equals("java.security.InvalidParameterException"));
+		assertEquals("Failed toString test for constructed instance", "java.security.InvalidParameterException", e
+				.toString());
 	}
 
 	/**
@@ -37,11 +37,10 @@
 		// java.security.InvalidParameterException(java.lang.String)
 		InvalidParameterException e = new InvalidParameterException(
 				"test message");
-		assertTrue(
-				"Failed toString test for constructed instance",
-				e
+		assertEquals("Failed toString test for constructed instance",
+				
+								"java.security.InvalidParameterException: test message", e
 						.toString()
-						.equals(
-								"java.security.InvalidParameterException: test message"));
+						);
 	}
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/KeyExceptionTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/KeyExceptionTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/KeyExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/KeyExceptionTest.java Tue Apr 25 20:45:27 2006
@@ -25,8 +25,8 @@
 	public void test_Constructor() {
 		// Test for method java.security.KeyException()
 		KeyException e = new KeyException();
-		assertTrue("Failed toString test for constructed instance", e
-				.toString().equals("java.security.KeyException"));
+		assertEquals("Failed toString test for constructed instance", "java.security.KeyException", e
+				.toString());
 	}
 
 	/**
@@ -35,7 +35,7 @@
 	public void test_ConstructorLjava_lang_String() {
 		// Test for method java.security.KeyException(java.lang.String)
 		KeyException e = new KeyException("test message");
-		assertTrue("Failed toString test for constructed instance", e
-				.toString().equals("java.security.KeyException: test message"));
+		assertEquals("Failed toString test for constructed instance", "java.security.KeyException: test message", e
+				.toString());
 	}
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/KeyStoreExceptionTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/KeyStoreExceptionTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/KeyStoreExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/KeyStoreExceptionTest.java Tue Apr 25 20:45:27 2006
@@ -25,8 +25,8 @@
 	public void test_Constructor() {
 		// Test for method java.security.KeyStoreException()
 		KeyStoreException e = new KeyStoreException();
-		assertTrue("Failed toString test for constructed instance", e
-				.toString().equals("java.security.KeyStoreException"));
+		assertEquals("Failed toString test for constructed instance", "java.security.KeyStoreException", e
+				.toString());
 	}
 
 	/**
@@ -35,8 +35,8 @@
 	public void test_ConstructorLjava_lang_String() {
 		// Test for method java.security.KeyStoreException(java.lang.String)
 		KeyStoreException e = new KeyStoreException("test message");
-		assertTrue("Failed toString test for constructed instance", e
-				.toString().equals(
-						"java.security.KeyStoreException: test message"));
+		assertEquals("Failed toString test for constructed instance", 
+						"java.security.KeyStoreException: test message", e
+				.toString());
 	}
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/KeyStoreTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/KeyStoreTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/KeyStoreTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/KeyStoreTest.java Tue Apr 25 20:45:27 2006
@@ -297,8 +297,8 @@
 				&& cert[1].getPublicKey() == certRes[1].getPublicKey());
 		java.security.cert.Certificate[] certResNull = keyTest
 				.getCertificateChain("alias1");
-		assertTrue("the certificate chain returned from "
-				+ "getCertificateChain is NOT null", certResNull == null);
+		assertNull("the certificate chain returned from "
+				+ "getCertificateChain is NOT null", certResNull);
 	}
 
 	/**
@@ -596,7 +596,7 @@
 		// alias 3
 		keyTest.setCertificateEntry("alias3", cert[1]);
 
-		assertTrue("the size of the keyStore is not 3", keyTest.size() == 3);
+		assertEquals("the size of the keyStore is not 3", 3, keyTest.size());
 	}
 
 	/**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/PermissionCollectionTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/PermissionCollectionTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/PermissionCollectionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/PermissionCollectionTest.java Tue Apr 25 20:45:27 2006
@@ -170,12 +170,12 @@
 			StringTokenizer resultTokenizer = new StringTokenizer(result, ",");
 
 			// Check the test result from the new VM process
-			assertTrue("Permission should be granted", resultTokenizer
-					.nextToken().equals("true"));
-			assertTrue("signed Permission should be granted", resultTokenizer
-					.nextToken().equals("true"));
-			assertTrue("Permission should not be granted", resultTokenizer
-					.nextToken().equals("false"));
+			assertEquals("Permission should be granted", "true", resultTokenizer
+					.nextToken());
+			assertEquals("signed Permission should be granted", "true", resultTokenizer
+					.nextToken());
+			assertEquals("Permission should not be granted", "false", resultTokenizer
+					.nextToken());
 		} catch (IOException e) {
 			fail("IOException during test : " + e);
 		} catch (InterruptedException e) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/ProviderExceptionTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/ProviderExceptionTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/ProviderExceptionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/ProviderExceptionTest.java Tue Apr 25 20:45:27 2006
@@ -35,8 +35,8 @@
 	public void test_ConstructorLjava_lang_String() {
 		// Test for method java.security.ProviderException(java.lang.String)
 		ProviderException e = new ProviderException("test message");
-		assertTrue("Failed toString test for constructed instance", e
-				.toString().equals(
-						"java.security.ProviderException: test message"));
+		assertEquals("Failed toString test for constructed instance", 
+						"java.security.ProviderException: test message", e
+				.toString());
 	}
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/SecurityPermissionTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/SecurityPermissionTest.java?rev=397071&r1=397070&r2=397071&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/SecurityPermissionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/java/common/tests/api/java/security/SecurityPermissionTest.java Tue Apr 25 20:45:27 2006
@@ -24,9 +24,9 @@
 	 */
 	public void test_ConstructorLjava_lang_String() {
 		// Test for method java.security.SecurityPermission(java.lang.String)
-		assertTrue("create securityPermission constructor(string) failed",
-				new SecurityPermission("SecurityPermission(string)").getName()
-						.equals("SecurityPermission(string)"));
+		assertEquals("create securityPermission constructor(string) failed",
+				"SecurityPermission(string)", new SecurityPermission("SecurityPermission(string)").getName()
+						);
 
 	}
 
@@ -38,9 +38,8 @@
 		// Test for method java.security.SecurityPermission(java.lang.String,
 		// java.lang.String)
 		SecurityPermission sp = new SecurityPermission("security.file", "write");
-		assertTrue(
-				"creat securityPermission constructor(string,string) failed",
-				sp.getName().equals("security.file"));
+		assertEquals("creat securityPermission constructor(string,string) failed",
+				"security.file", sp.getName());
 
 	}
 }



Mime
View raw message