XACMLExportTest.java revision 1f1a4f601910433031571ae0439dbe569b9928bc
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2009 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: XACMLExportTest.java,v 1.1 2009/11/25 18:54:08 dillidorai Exp $
*
* Portions Copyrighted 2014 ForgeRock AS
*/
/**
* Portions copyright 2014 ForgeRock AS.
*/
/**
*
* @author dillidorai
*/
public class XACMLExportTest {
private SSOToken adminToken = (SSOToken) AccessController.doPrivileged(AdminTokenAction.getInstance());
private UserSubject ua;
private PrivilegeManager pm;
private Privilege privilege1;
private Privilege privilege2;
private String policySetXML;
public void setup()
//UnittestLog.logMessage("XACMLExportTest.addPrivilege(), setup");
if (!migrated) {
throw new RuntimeException("Server not in entitlement mode");
}
/*
StaticAttributes sa1 = new StaticAttributes();
Set<String> aValues = new HashSet<String>();
aValues.add("a10");
aValues.add("a20");
sa1.setPropertyName("a");
sa1.setPropertyValues(aValues);
sa1.setPResponseProviderName("sa");
StaticAttributes sa2 = new StaticAttributes();
Set<String> bValues = new HashSet<String>();
bValues.add("b10");
bValues.add("b20");
sa2.setPropertyName("b");
sa2.setPropertyValues(bValues);
sa2.setPResponseProviderName("sa");
UserAttributes uat1 = new UserAttributes();
uat1.setPropertyName("email");
uat1.setPResponseProviderName("ua");
UserAttributes uat2 = new UserAttributes();
uat2.setPropertyName("uid");
uat2.setPResponseProviderName("ua");
Set<ResourceAttribute> ra = new HashSet<ResourceAttribute>();
ra.add(sa1);
ra.add(sa2);
ra.add(uat1);
ra.add(uat2);
*/
//privilege.setResourceAttributes(ra);
//UnittestLog.logMessage("XACMLExportTest.setup(), added privilege:" +
//"Privilege1=" + privilege1.toString());
}
public void deletePrivilege()
//UnittestLog.logMessage("XACMLExportTest.deletePrivilege(), cleanup");
}
@Test
public void testListXACML() throws EntitlementException {
//UnittestLog.logMessage("XACMLExportTest.testListXACML()");
}
public void testDeleteXACML()
//UnittestLog.logMessage("XACMLExportTest.testDeleteXACML()");
}
public void testCreateXACML() throws Exception {
//UnittestLog.logMessage("XACMLExportTest.testCreateXACML()");
//UnittestLog.logMessage("XACMLExportTest.testCreateXML(): policySetXML:"
//+ policySetXML);
throw new Exception("privielges is null");
}
//UnittestLog.logMessage("XACMLExportTest.testCreateXML(): original priivilege:"
//+ privilege1.toString());
//UnittestLog.logMessage("XACMLExportTest.testCreateXML(): recreated priivilege:"
//+ privilege.toString());
throw new Exception("privielge is null");
}
}
}