harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r433915 - in /incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth: ./ login/
Date Wed, 23 Aug 2006 05:51:59 GMT
Author: smishura
Date: Tue Aug 22 22:51:58 2006
New Revision: 433915

URL: http://svn.apache.org/viewvc?rev=433915&view=rev
Log:
Remove VM behaviour testing

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/DestroyFailedExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/RefreshFailedExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AccountExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AccountExpiredExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AccountLockedExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AccountNotFoundExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/CredentialExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/CredentialExpiredExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/CredentialNotFoundExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/FailedLoginExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/LoginExceptionTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/DestroyFailedExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/DestroyFailedExceptionTest.java?rev=433915&r1=433914&r2=433915&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/DestroyFailedExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/DestroyFailedExceptionTest.java
Tue Aug 22 22:51:58 2006
@@ -28,40 +28,30 @@
 /**
  * Tests DestroyFailedException class
  */
-
 public class DestroyFailedExceptionTest extends TestCase {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(DestroyFailedExceptionTest.class);
+    /**
+     * @tests javax.security.auth.DestroyFailedException#DestroyFailedException()
+     */
+    public final void testCtor1() {
+        assertNull(new DestroyFailedException().getMessage());
     }
 
-    public final void testDestroyFailedException_01() {
-        DestroyFailedException tE = new DestroyFailedException();
-        assertEquals (null, tE.getMessage());
-        try {
-            throw tE;
-        }catch (Exception e){
-            assertTrue(tE.equals(e));
-        }
+    /**
+     * @tests javax.security.auth.DestroyFailedException#DestroyFailedException(
+     *        java.lang.String)
+     */
+    public final void testCtor2() {
+        assertNull(new DestroyFailedException(null).getMessage());
 
-    }
+        String message = "";
+        assertSame(message, new DestroyFailedException(message).getMessage());
 
-    public final void testDestroyFailedException_02() {
-        DestroyFailedException tE = new DestroyFailedException("message");
-        assertEquals ("message", tE.getMessage());
-        try {
-            throw tE;
-        }catch (Exception e){
-            assertTrue(tE.equals(e));
-        }
+        message = "message";
+        assertSame(message, new DestroyFailedException(message).getMessage());
     }
 
-    public final void testDestroyFailedException_03() {
-        try {
-            throw new DestroyFailedException();
-        }catch (Exception e){
-            assertEquals("javax.security.auth.DestroyFailedException", e
-                    .getClass().getName());
-        }
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(DestroyFailedExceptionTest.class);
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/RefreshFailedExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/RefreshFailedExceptionTest.java?rev=433915&r1=433914&r2=433915&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/RefreshFailedExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/RefreshFailedExceptionTest.java
Tue Aug 22 22:51:58 2006
@@ -28,44 +28,30 @@
 /**
  * Tests RefreshFailedException class
  */
-
 public class RefreshFailedExceptionTest extends TestCase {
 
-    RefreshFailedException rfe;
-    
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(RefreshFailedExceptionTest.class);
+    /**
+     * @tests javax.security.auth.RefreshFailedException#RefreshFailedException()
+     */
+    public final void testCtor1() {
+        assertNull(new RefreshFailedException().getMessage());
     }
 
-    public final void testRefreshFailedException_01() {
-        RefreshFailedException tE = new RefreshFailedException();
-        assertEquals (null, tE.getMessage());
-        try {
-            throw tE;
-        }catch (Exception e){
-            assertTrue(tE.equals(e));
-        }
+    /**
+     * @tests javax.security.auth.RefreshFailedException#RefreshFailedException(
+     *        java.lang.String)
+     */
+    public final void testCtor2() {
+        assertNull(new RefreshFailedException(null).getMessage());
 
-    }
+        String message = "";
+        assertSame(message, new RefreshFailedException(message).getMessage());
 
-    public final void testRefreshFailedException_02() {
-        RefreshFailedException tE = new RefreshFailedException("message");
-        assertEquals ("message", tE.getMessage());
-        try {
-            throw tE;
-        }catch (Exception e){
-            assertTrue(tE.equals(e));
-        }
+        message = "message";
+        assertSame(message, new RefreshFailedException(message).getMessage());
     }
-
-    public final void testRefreshFailedException_03() {
-        try {
-            throw new RefreshFailedException();
-        }catch (Exception e){
-            assertEquals("javax.security.auth.RefreshFailedException", e
-                    .getClass().getName());
-        }
+    
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(RefreshFailedExceptionTest.class);
     }
 }
-
-

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AccountExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AccountExceptionTest.java?rev=433915&r1=433914&r2=433915&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AccountExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AccountExceptionTest.java
Tue Aug 22 22:51:58 2006
@@ -28,40 +28,30 @@
 /**
  * Tests AccountException class
  */
-
 public class AccountExceptionTest extends TestCase {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(AccountExceptionTest.class);
+    /**
+     * @tests javax.security.auth.login.AccountException#AccountException()
+     */
+    public final void testCtor1() {
+        assertNull(new AccountException().getMessage());
     }
 
-    public final void testAccountException_01() {
-        AccountException tE = new AccountException();
-        assertEquals (null, tE.getMessage());
-        try {
-            throw tE;
-        }catch (Exception e){
-            assertTrue(tE.equals(e));
-        }
+    /**
+     * @tests javax.security.auth.login.AccountException#AccountException(
+     *        java.lang.String)
+     */
+    public final void testCtor2() {
+        assertNull(new AccountException(null).getMessage());
 
-    }
+        String message = "";
+        assertSame(message, new AccountException(message).getMessage());
 
-    public final void testAccountException_02() {
-        AccountException tE = new AccountException("message");
-        assertEquals ("message", tE.getMessage());
-        try {
-            throw tE;
-        }catch (Exception e){
-            assertTrue(tE.equals(e));
-        }
+        message = "message";
+        assertSame(message, new AccountException(message).getMessage());
     }
 
-    public final void testAccountException_03() {
-        try {
-            throw new AccountException();
-        }catch (Exception e){
-            assertEquals("javax.security.auth.login.AccountException", e
-                    .getClass().getName());
-        }
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(AccountExceptionTest.class);
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AccountExpiredExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AccountExpiredExceptionTest.java?rev=433915&r1=433914&r2=433915&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AccountExpiredExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AccountExpiredExceptionTest.java
Tue Aug 22 22:51:58 2006
@@ -21,7 +21,6 @@
 
 package org.apache.harmony.auth.tests.javax.security.auth.login;
 
-import javax.security.auth.login.AccountException;
 import javax.security.auth.login.AccountExpiredException;
 
 import junit.framework.TestCase;
@@ -29,52 +28,30 @@
 /**
  * Tests AccountExpiredException class
  */
-
 public class AccountExpiredExceptionTest extends TestCase {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(AccountExpiredExceptionTest.class);
+    /**
+     * @tests javax.security.auth.login.AccountExpiredException#AccountExpiredException()
+     */
+    public final void testCtor1() {
+        assertNull(new AccountExpiredException().getMessage());
     }
 
-    public final void testAccountExpiredException_01() {
-        AccountExpiredException tE = new AccountExpiredException();
-        assertEquals (null, tE.getMessage());
-        try {
-            throw tE;
-        }catch (Exception e){
-            assertTrue(tE.equals(e));
-        }
-
-    }
+    /**
+     * @tests javax.security.auth.login.AccountExpiredException#AccountExpiredException(
+     *        java.lang.String)
+     */
+    public final void testCtor2() {
+        assertNull(new AccountExpiredException(null).getMessage());
 
-    public final void testAccountExpiredException_02() {
-        AccountExpiredException tE = new AccountExpiredException("message");
-        assertEquals ("message", tE.getMessage());
-        try {
-            throw tE;
-        }catch (Exception e){
-            assertTrue(tE.equals(e));
-        }
+        String message = "";
+        assertSame(message, new AccountExpiredException(message).getMessage());
 
+        message = "message";
+        assertSame(message, new AccountExpiredException(message).getMessage());
     }
-    
-    public final void testAccountExpiredException_03() {
-        AccountExpiredException tE = new AccountExpiredException("message");
-        try {
-            throw tE;
-        }catch (AccountException e){
-            assertTrue(tE.equals(e));
-        }
-        try {
-            throw tE;
-        }catch (AccountExpiredException e){
-            assertTrue(tE.equals(e));
-        }
-        try {
-            throw new AccountExpiredException();
-        }catch (AccountException e){
-            assertEquals("javax.security.auth.login.AccountExpiredException", e
-                    .getClass().getName());
-        }
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(AccountExpiredExceptionTest.class);
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AccountLockedExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AccountLockedExceptionTest.java?rev=433915&r1=433914&r2=433915&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AccountLockedExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AccountLockedExceptionTest.java
Tue Aug 22 22:51:58 2006
@@ -21,7 +21,6 @@
 
 package org.apache.harmony.auth.tests.javax.security.auth.login;
 
-import javax.security.auth.login.AccountException;
 import javax.security.auth.login.AccountLockedException;
 
 import junit.framework.TestCase;
@@ -29,52 +28,30 @@
 /**
  * Tests AccountLockedException class
  */
-
 public class AccountLockedExceptionTest extends TestCase {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(AccountLockedExceptionTest.class);
+    /**
+     * @tests javax.security.auth.login.AccountLockedException#AccountLockedException()
+     */
+    public final void testCtor1() {
+        assertNull(new AccountLockedException().getMessage());
     }
 
-    public final void testAccountLockedException_01() {
-        AccountLockedException tE = new AccountLockedException();
-        assertEquals (null, tE.getMessage());
-        try {
-            throw tE;
-        }catch (Exception e){
-            assertTrue(tE.equals(e));
-        }
-
-    }
+    /**
+     * @tests javax.security.auth.login.AccountLockedException#AccountLockedException(
+     *        java.lang.String)
+     */
+    public final void testCtor2() {
+        assertNull(new AccountLockedException(null).getMessage());
 
-    public final void testAccountLockedException_02() {
-        AccountLockedException tE = new AccountLockedException("message");
-        assertEquals ("message", tE.getMessage());
-        try {
-            throw tE;
-        }catch (Exception e){
-            assertTrue(tE.equals(e));
-        }
+        String message = "";
+        assertSame(message, new AccountLockedException(message).getMessage());
 
+        message = "message";
+        assertSame(message, new AccountLockedException(message).getMessage());
     }
-    
-    public final void testAccountLockedException_03() {
-        AccountLockedException tE = new AccountLockedException("message");
-        try {
-            throw tE;
-        }catch (AccountException e){
-            assertTrue(tE.equals(e));
-        }
-        try {
-            throw tE;
-        }catch (AccountLockedException e){
-            assertTrue(tE.equals(e));
-        }
-        try {
-            throw new AccountLockedException();
-        }catch (AccountException e){
-            assertEquals("javax.security.auth.login.AccountLockedException", e
-                    .getClass().getName());
-        }
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(AccountLockedExceptionTest.class);
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AccountNotFoundExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AccountNotFoundExceptionTest.java?rev=433915&r1=433914&r2=433915&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AccountNotFoundExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AccountNotFoundExceptionTest.java
Tue Aug 22 22:51:58 2006
@@ -21,7 +21,6 @@
 
 package org.apache.harmony.auth.tests.javax.security.auth.login;
 
-import javax.security.auth.login.AccountException;
 import javax.security.auth.login.AccountNotFoundException;
 
 import junit.framework.TestCase;
@@ -29,52 +28,30 @@
 /**
  * Tests AccountNotFoundException class
  */
-
 public class AccountNotFoundExceptionTest extends TestCase {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(AccountNotFoundExceptionTest.class);
+    /**
+     * @tests javax.security.auth.login.AccountNotFoundException#AccountNotFoundException()
+     */
+    public final void testCtor1() {
+        assertNull(new AccountNotFoundException().getMessage());
     }
- 
-    public final void testAccountNotFoundException_01() {
-        AccountNotFoundException tE = new AccountNotFoundException();
-        assertEquals (null, tE.getMessage());
-        try {
-            throw tE;
-        }catch (Exception e){
-            assertTrue(tE.equals(e));
-        }
 
-    }
+    /**
+     * @tests javax.security.auth.login.AccountNotFoundException#AccountNotFoundException(
+     *        java.lang.String)
+     */
+    public final void testCtor2() {
+        assertNull(new AccountNotFoundException(null).getMessage());
 
-    public final void testAccountNotFoundException_02() {
-        AccountNotFoundException tE = new AccountNotFoundException("message");
-        assertEquals ("message", tE.getMessage());
-        try {
-            throw tE;
-        }catch (Exception e){
-            assertTrue(tE.equals(e));
-        }
+        String message = "";
+        assertSame(message, new AccountNotFoundException(message).getMessage());
 
+        message = "message";
+        assertSame(message, new AccountNotFoundException(message).getMessage());
     }
-    
-    public final void testAccountNotFoundException_03() {
-        AccountNotFoundException tE = new AccountNotFoundException("message");
-        try {
-            throw tE;
-        }catch (AccountException e){
-            assertTrue(tE.equals(e));
-        }
-        try {
-            throw tE;
-        }catch (AccountNotFoundException e){
-            assertTrue(tE.equals(e));
-        }
-        try {
-            throw new AccountNotFoundException();
-        }catch (AccountException e){
-            assertEquals("javax.security.auth.login.AccountNotFoundException",
-                    e.getClass().getName());
-        }
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(AccountNotFoundExceptionTest.class);
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/CredentialExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/CredentialExceptionTest.java?rev=433915&r1=433914&r2=433915&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/CredentialExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/CredentialExceptionTest.java
Tue Aug 22 22:51:58 2006
@@ -28,41 +28,30 @@
 /**
  * Tests CredentialException class
  */
-
 public class CredentialExceptionTest extends TestCase {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(CredentialExceptionTest.class);
+    /**
+     * @tests javax.security.auth.login.CredentialException#CredentialException()
+     */
+    public final void testCtor1() {
+        assertNull(new CredentialException().getMessage());
     }
-    
-    public final void testCredentialException_01() {
-        CredentialException tE = new CredentialException();
-        assertEquals (null, tE.getMessage());
-        try {
-            throw tE;
-        }catch (Exception e){
-            assertTrue(tE.equals(e));
-        }
 
-    }
+    /**
+     * @tests javax.security.auth.login.CredentialException#CredentialException(
+     *        java.lang.String)
+     */
+    public final void testCtor2() {
+        assertNull(new CredentialException(null).getMessage());
 
-    public final void testCredentialException_02() {
-        CredentialException tE = new CredentialException("message");
-        assertEquals ("message", tE.getMessage());
-        try {
-            throw tE;
-        }catch (Exception e){
-            assertTrue(tE.equals(e));
-        }
-    }
+        String message = "";
+        assertSame(message, new CredentialException(message).getMessage());
 
+        message = "message";
+        assertSame(message, new CredentialException(message).getMessage());
+    }
 
-    public final void testCredentialException_03() {
-        try {
-            throw new CredentialException();
-        }catch (Exception e){
-            assertEquals("javax.security.auth.login.CredentialException", e
-                    .getClass().getName());
-        }
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(CredentialExceptionTest.class);
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/CredentialExpiredExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/CredentialExpiredExceptionTest.java?rev=433915&r1=433914&r2=433915&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/CredentialExpiredExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/CredentialExpiredExceptionTest.java
Tue Aug 22 22:51:58 2006
@@ -21,7 +21,6 @@
 
 package org.apache.harmony.auth.tests.javax.security.auth.login;
 
-import javax.security.auth.login.CredentialException;
 import javax.security.auth.login.CredentialExpiredException;
 
 import junit.framework.TestCase;
@@ -32,50 +31,30 @@
 
 public class CredentialExpiredExceptionTest extends TestCase {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(CredentialExpiredException.class);
+    /**
+     * @tests javax.security.auth.login.CredentialExpiredException#CredentialExpiredException()
+     */
+    public final void testCtor1() {
+        assertNull(new CredentialExpiredException().getMessage());
     }
 
-    public final void testCredentialExpiredException_01() {
-        CredentialExpiredException tE = new CredentialExpiredException();
-        assertEquals (null, tE.getMessage());
-        try {
-            throw tE;
-        }catch (Exception e){
-            assertTrue(tE.equals(e));
-        }
-
+    /**
+     * @tests javax.security.auth.login.CredentialExpiredException#CredentialExpiredException(
+     *        java.lang.String)
+     */
+    public final void testCtor2() {
+        assertNull(new CredentialExpiredException(null).getMessage());
+
+        String message = "";
+        assertSame(message, new CredentialExpiredException(message)
+                .getMessage());
+
+        message = "message";
+        assertSame(message, new CredentialExpiredException(message)
+                .getMessage());
     }
 
-    public final void testCredentialExpiredException_02() {
-        CredentialExpiredException tE = new CredentialExpiredException("message");
-        assertEquals ("message", tE.getMessage());
-        try {
-            throw tE;
-        }catch (Exception e){
-            assertTrue(tE.equals(e));
-        }
-
-    }
-    
-    public final void testCredentialExpiredException_03() {
-        CredentialExpiredException tE = new CredentialExpiredException("message");
-        try {
-            throw tE;
-        }catch (CredentialException e){
-              assertTrue(tE.equals(e));
-        }
-        try {
-            throw tE;
-        }catch (CredentialExpiredException e){
-              assertTrue(tE.equals(e));
-        }
-        try {
-            throw new CredentialExpiredException();
-        }catch (CredentialException e){
-            assertEquals(
-                    "javax.security.auth.login.CredentialExpiredException", e
-                            .getClass().getName());
-        }
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(CredentialExpiredException.class);
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/CredentialNotFoundExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/CredentialNotFoundExceptionTest.java?rev=433915&r1=433914&r2=433915&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/CredentialNotFoundExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/CredentialNotFoundExceptionTest.java
Tue Aug 22 22:51:58 2006
@@ -21,7 +21,6 @@
 
 package org.apache.harmony.auth.tests.javax.security.auth.login;
 
-import javax.security.auth.login.CredentialException;
 import javax.security.auth.login.CredentialNotFoundException;
 
 import junit.framework.TestCase;
@@ -29,53 +28,32 @@
 /**
  * Tests CredentialNotFoundException class
  */
-
 public class CredentialNotFoundExceptionTest extends TestCase {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(CredentialNotFoundExceptionTest.class);
+    /**
+     * @tests javax.security.auth.login.CredentialNotFoundException#CredentialNotFoundException()
+     */
+    public final void testCtor1() {
+        assertNull(new CredentialNotFoundException().getMessage());
     }
 
-    public final void testCredentialNotFoundException_01() {
-        CredentialNotFoundException tE = new CredentialNotFoundException();
-        assertEquals (null, tE.getMessage());
-        try {
-            throw tE;
-        }catch (Exception e){
-            assertTrue(tE.equals(e));
-        }
-
+    /**
+     * @tests javax.security.auth.login.CredentialNotFoundException#CredentialNotFoundException(
+     *        java.lang.String)
+     */
+    public final void testCtor2() {
+        assertNull(new CredentialNotFoundException(null).getMessage());
+
+        String message = "";
+        assertSame(message, new CredentialNotFoundException(message)
+                .getMessage());
+
+        message = "message";
+        assertSame(message, new CredentialNotFoundException(message)
+                .getMessage());
     }
 
-    public final void testCredentialNotFoundException_02() {
-        CredentialNotFoundException tE = new CredentialNotFoundException("message");
-        assertEquals ("message", tE.getMessage());
-        try {
-            throw tE;
-        }catch (Exception e){
-            assertTrue(tE.equals(e));
-        }
-
-    }
-    
-    public final void testCredentialNotFoundException_03() {
-        CredentialNotFoundException tE = new CredentialNotFoundException("message");
-        try {
-            throw tE;
-        }catch (CredentialException e){
-            assertTrue(tE.equals(e));
-        }
-        try {
-            throw tE;
-        }catch (CredentialNotFoundException e){
-            assertTrue(tE.equals(e));
-        }
-        try {
-            throw new CredentialNotFoundException();
-        }catch (CredentialException e){
-            assertEquals(
-                    "javax.security.auth.login.CredentialNotFoundException", e
-                            .getClass().getName());
-        }
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(CredentialNotFoundExceptionTest.class);
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/FailedLoginExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/FailedLoginExceptionTest.java?rev=433915&r1=433914&r2=433915&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/FailedLoginExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/FailedLoginExceptionTest.java
Tue Aug 22 22:51:58 2006
@@ -22,56 +22,36 @@
 package org.apache.harmony.auth.tests.javax.security.auth.login;
 
 import javax.security.auth.login.FailedLoginException;
-import javax.security.auth.login.LoginException;
 
 import junit.framework.TestCase;
+
 /**
  * Tests FailedLoginException class
  */
-
 public class FailedLoginExceptionTest extends TestCase {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(FailedLoginExceptionTest.class);
+    /**
+     * @tests javax.security.auth.login.FailedLoginException#FailedLoginException()
+     */
+    public final void testCtor1() {
+        assertNull(new FailedLoginException().getMessage());
     }
 
-    public final void testFailedLoginException_01() {
-        FailedLoginException tE = new FailedLoginException();
-        assertEquals (null, tE.getMessage());
-        try {
-            throw tE;
-        }catch (Exception e){
-            assertTrue(tE.equals(e));
-        }
-    }
+    /**
+     * @tests javax.security.auth.login.FailedLoginException#FailedLoginException(
+     *        java.lang.String)
+     */
+    public final void testCtor2() {
+        assertNull(new FailedLoginException(null).getMessage());
 
-    public final void testFailedLoginException_02() {
-        FailedLoginException tE = new FailedLoginException("message");
-        assertEquals ("message", tE.getMessage());
-        try {
-            throw tE;
-        }catch (Exception e){
-            assertTrue(tE.equals(e));
-        }
+        String message = "";
+        assertSame(message, new FailedLoginException(message).getMessage());
+
+        message = "message";
+        assertSame(message, new FailedLoginException(message).getMessage());
     }
-    
-    public final void testFailedLoginException_03() {
-        FailedLoginException tE = new FailedLoginException("message");
-        try {
-            throw tE;
-        }catch (LoginException e){
-            assertTrue(tE.equals(e));
-        }
-        try {
-            throw tE;
-        }catch (FailedLoginException e){
-            assertTrue(tE.equals(e));
-        }
-        try {
-            throw new FailedLoginException();
-        }catch (LoginException e){
-            assertEquals("javax.security.auth.login.FailedLoginException", e
-                    .getClass().getName());
-        }
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(FailedLoginExceptionTest.class);
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/LoginExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/LoginExceptionTest.java?rev=433915&r1=433914&r2=433915&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/LoginExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/LoginExceptionTest.java
Tue Aug 22 22:51:58 2006
@@ -24,43 +24,34 @@
 import javax.security.auth.login.LoginException;
 
 import junit.framework.TestCase;
+
 /**
  * Tests LoginException class
  */
-
 public class LoginExceptionTest extends TestCase {
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(LoginExceptionTest.class);
+    /**
+     * @tests javax.security.auth.login.LoginException#LoginException()
+     */
+    public final void testCtor1() {
+        assertNull(new LoginException().getMessage());
     }
 
-    public final void testLoginException_01() {
-        LoginException tE = new LoginException();
-        assertEquals (null, tE.getMessage());
-        try {
-            throw tE;
-        }catch (Exception e){
-            assertTrue(tE.equals(e));
-        }
+    /**
+     * @tests javax.security.auth.login.LoginException#LoginException(
+     *        java.lang.String)
+     */
+    public final void testCtor2() {
+        assertNull(new LoginException(null).getMessage());
 
-    }
+        String message = "";
+        assertSame(message, new LoginException(message).getMessage());
 
-    public final void testLoginException_02() {
-        LoginException tE = new LoginException("message");
-        assertEquals ("message", tE.getMessage());
-        try {
-            throw tE;
-        }catch (Exception e){
-            assertTrue(tE.equals(e));
-        }
+        message = "message";
+        assertSame(message, new LoginException(message).getMessage());
     }
 
-    public final void testLoginException_03() {
-        try {
-            throw new LoginException();
-        }catch (Exception e){
-            assertEquals("javax.security.auth.login.LoginException", e
-                    .getClass().getName());
-        }
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(LoginExceptionTest.class);
     }
 }



Mime
View raw message