Code example for AbstractTransactionalTestNGSpringContextTests

Methods: assertTrue

0
        PersistedObjectsFactory.createAndSaveViewTopicsBranchesEntity( 
                ObjectsFactory.getDefaultBranch().getId(), user.getClass().getSimpleName(), true 
        ); 
 
        List<Long> collection = this.dao.getAllowedBranchesIds(user); 
        assertTrue(collection.size() > 0); 
    } 
 
    @Test 
    public void testGetAllowedBranchesIdsWithAnonymousUserAllowedAndRestricted() { 
 
        AnonymousUser user = new AnonymousUser(); 
 
        PersistedObjectsFactory.createAndSaveViewTopicsBranchesEntity( 
                ObjectsFactory.getDefaultBranch().getId(), user.getClass().getSimpleName(), true 
        ); 
 
        PersistedObjectsFactory.createAndSaveViewTopicsBranchesEntity( 
                ObjectsFactory.getDefaultBranch().getId(), user.getClass().getSimpleName(), false 
        );