Home | History | Annotate | Download | only in cts
      1 package android.accounts.cts;
      2 
      3 import android.accounts.AccountsException;
      4 import android.accounts.AuthenticatorException;
      5 import android.accounts.NetworkErrorException;
      6 import android.accounts.OperationCanceledException;
      7 
      8 import junit.framework.TestCase;
      9 
     10 public class ExceptionTest extends TestCase {
     11 
     12     private String message = "Message";
     13     private Throwable cause = new Throwable("Throwable casue");
     14 
     15     public void testAccountsException() {
     16         new AccountsException();
     17     }
     18 
     19     public void testAccountsExceptionWithMessage() {
     20         new AccountsException(message);
     21     }
     22 
     23     public void testAccountsExceptionWithThrowableCause() {
     24         new AccountsException(cause);
     25     }
     26 
     27     public void testAccountsExceptionWithMessageAndThrowableCause() {
     28         new AccountsException(message, cause);
     29     }
     30 
     31     public void testNetworkErrorException() {
     32         new NetworkErrorException();
     33     }
     34 
     35     public void testNetworkErrorExceptionWithMessage() {
     36         new NetworkErrorException(message);
     37     }
     38 
     39     public void testNetworkErrorExceptionWithThrowableCause() {
     40         new NetworkErrorException(cause);
     41     }
     42 
     43     public void testNetworkErrorExceptionWithMessageAndThrowableCause() {
     44         new NetworkErrorException(message, cause);
     45     }
     46 
     47     public void testAuthenticatorException() {
     48         new AuthenticatorException();
     49     }
     50 
     51     public void testAuthenticatorExceptionWithMessage() {
     52         new AuthenticatorException(message);
     53     }
     54 
     55     public void testAuthenticatorExceptionWithThrowableCause() {
     56         new AuthenticatorException(cause);
     57     }
     58 
     59     public void testAuthenticatorExceptionWithMessageAndThrowableCause() {
     60         new AuthenticatorException(message, cause);
     61     }
     62 
     63     public void testOperationCanceledException() {
     64         new OperationCanceledException();
     65     }
     66 
     67     public void testOperationCanceledExceptionWithMessage() {
     68         new OperationCanceledException(message);
     69     }
     70 
     71     public void testOperationCanceledExceptionWithThrowableCause() {
     72         new OperationCanceledException(cause);
     73     }
     74 
     75     public void testOperationCanceledExceptionWithMessageAndThrowableCause() {
     76         new OperationCanceledException(message, cause);
     77     }
     78 }
     79