/* * 7 covered goals: * 1 org.jsecurity.realm.SimpleAccountRealm.accountExists(Ljava/lang/String;)Z: I5 Branch 2 IFNULL L85 - true * 2 org.jsecurity.realm.SimpleAccountRealm.afterRoleCacheSet()V: root-Branch * 3 org.jsecurity.realm.SimpleAccountRealm.afterAuthorizationCacheSet()V: root-Branch * 4 org.jsecurity.realm.SimpleAccountRealm.<init>()V: root-Branch * 5 org.jsecurity.realm.SimpleAccountRealm.getUser(Ljava/lang/String;)Lorg/jsecurity/authc/SimpleAccount;: root-Branch * 6 org.jsecurity.realm.SimpleAccountRealm.accountAndRoleCachesCreated()V: root-Branch * 7 org.jsecurity.realm.SimpleAccountRealm.initRoleCache()V: I4 Branch 1 IFNONNULL L72 - true */ @Test public void test0() throws Throwable { SimpleAccountRealm simpleAccountRealm0 = new SimpleAccountRealm(); HashtableCacheManager hashtableCacheManager0 = new HashtableCacheManager(); simpleAccountRealm0.setCacheManager((CacheManager) hashtableCacheManager0); boolean boolean0 = simpleAccountRealm0.accountExists("pVk`-kKrk"); assertEquals("org.jsecurity.realm.SimpleAccountRealm_0", simpleAccountRealm0.getName()); assertEquals(false, boolean0); }
/* * 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); }