/*
  * 6 covered goals:
  * 1 org.jsecurity.realm.SimpleAccountRealm.accountExists(Ljava/lang/String;)Z: I5 Branch 2 IFNULL L85 - false
  * 2 org.jsecurity.realm.SimpleAccountRealm.addAccount(Ljava/lang/String;Ljava/lang/String;)V: root-Branch
  * 3 org.jsecurity.realm.SimpleAccountRealm.addAccount(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)V: root-Branch
  * 4 org.jsecurity.realm.SimpleAccountRealm.getUser(Ljava/lang/String;)Lorg/jsecurity/authc/SimpleAccount;: root-Branch
  * 5 org.jsecurity.realm.SimpleAccountRealm.add(Lorg/jsecurity/authc/SimpleAccount;)V: root-Branch
  * 6 org.jsecurity.realm.SimpleAccountRealm.getAuthorizationCacheKey(Lorg/jsecurity/subject/PrincipalCollection;)Ljava/lang/Object;: root-Branch
  */
 @Test
 public void test3() throws Throwable {
   SimpleAccountRealm simpleAccountRealm0 = new SimpleAccountRealm();
   HashtableCache hashtableCache0 = new HashtableCache("U>dPoO#:");
   simpleAccountRealm0.setAuthorizationCache((Cache) hashtableCache0);
   simpleAccountRealm0.addAccount("U>dPoO#:", "U>dPoO#:");
   boolean boolean0 = simpleAccountRealm0.accountExists("U>dPoO#:");
   assertEquals("org.jsecurity.realm.SimpleAccountRealm_27", simpleAccountRealm0.getName());
   assertEquals(true, boolean0);
 }
Ejemplo n.º 2
0
 public void addAccount(String username, String password) {
   addAccount(username, password, (String[]) null);
 }