Examples of ProfileConfiguration


Examples of org.wso2.carbon.user.core.profile.ProfileConfiguration

       
    }

    public static Map<String, ProfileConfiguration> getProfileTestData() {
        Map<String, ProfileConfiguration> map = new HashMap<String, ProfileConfiguration>();
        ProfileConfiguration profConfig = new ProfileConfiguration();
        profConfig.setProfileName(HOME_PROFILE_NAME);
        profConfig.addHiddenClaim(CLAIM_URI1);
        profConfig.addInheritedClaim(CLAIM_URI2);
        profConfig.setDialectName("http://wso2.org/");
        map.put(HOME_PROFILE_NAME, profConfig);
        return map;
    }
View Full Code Here

Examples of org.wso2.carbon.user.core.profile.ProfileConfiguration

    public void checkProfilePersistStuff() throws Exception {
        //test add
        profileDAO.addProfileConfig(profConfigs.get(ClaimTestUtil.HOME_PROFILE_NAME));
        Map<String, ProfileConfiguration> map = profileDAO.loadProfileConfigs();
        TestCase.assertEquals(1, map.size());
        ProfileConfiguration gotConfig = map.get(ClaimTestUtil.HOME_PROFILE_NAME);
        TestCase.assertEquals(gotConfig.getHiddenClaims().get(0), ClaimTestUtil.CLAIM_URI1);
        TestCase.assertEquals(gotConfig.getInheritedClaims().size(), 0);
        TestCase.assertEquals(gotConfig.getOverriddenClaims().size(), 0);
       
        //test update
        ProfileConfiguration profConfig = profConfigs.get(ClaimTestUtil.HOME_PROFILE_NAME);
        profConfig.setInheritedClaims(new ArrayList<String>());
        profConfig.addOverriddenClaim(ClaimTestUtil.CLAIM_URI3);
        profileDAO.updateProfileConfig(profConfig);
        map = profileDAO.loadProfileConfigs();
        gotConfig = map.get(profConfig.getProfileName());
        TestCase.assertEquals(gotConfig.getHiddenClaims().get(0), ClaimTestUtil.CLAIM_URI1);
        TestCase.assertEquals(gotConfig.getInheritedClaims().size(),0);
        TestCase.assertEquals(gotConfig.getOverriddenClaims().get(0), ClaimTestUtil.CLAIM_URI3);
       
        //test delete
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.