/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2006 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: AMIdentityTestBase.java,v 1.5 2008/06/25 05:44:19 qcheng Exp $
*
*/
/**
* Portions Copyrighted 2012 ForgeRock Inc
*/
/**
* This class tests the <code>com.sun.identity.idm.AMIdentity</code> class.
*/
public AMIdentityTestBase() {
super("IDM");
}
/**
* Creates realm before the test suites are executed.
*
* @throws SMSException if realm cannot be created.
* @throws SSOException if the super administrator Single Sign On is
* invalid.
*/
@Parameters({"parent-realms"})
throws SSOException, SMSException {
while (st.hasMoreElements()) {
}
exiting("suiteSetup");
}
/**
* Creates realm and <code>AMIdenity</code> object before the testcases are
* executed.
*
* @throws Exception if <code>AMIdenity</code> object cannot be created.
*/
"entity-creation-attributes"})
public void setup(
) throws Exception {
try {
values);
}
}
} catch (Exception e) {
e.printStackTrace();
throw e;
}
exiting("setup");
}
/**
* Assigning and deassigning services to <code>AMIdentity</code> object.
*
* @throws Exception if cannot access to <code>AMIdentity</code> object.
*/
"entity-modify-service1-name", "entity-modify-service1-attributes"})
public void assignUnassignService(
) throws Exception {
try {
}
}
}
} catch (Exception e) {
e.printStackTrace();
throw e;
}
exiting("assignUnassignService");
}
/**
* Modifies attributes
*
* @throws Exception if cannot access to <code>AMIdentity</code> object.
*/
"entity-modify-attributes"})
public void modifyAttributes(
) throws Exception {
try {
} catch (Exception e) {
params);
e.printStackTrace();
throw e;
}
}
exiting("modifyAttributes");
}
/**
* Sets and gets binary attributes
*
* @throws Exception if cannot access to <code>AMIdentity</code> object.
**/
"entity-binary-attributes"})
public void setGetBinaryAttributes(
) throws Exception {
// Issue 77
try {
byte[][] values = new byte[1][];
} catch (Exception e) {
e.getMessage(), params);
e.printStackTrace();
throw e;
}
exiting("setGetBinaryAttributes");
}
/**
* Passes an null (Map) to the modify attribute API.
*
* @throws Exception if cannot access to <code>AMIdentity</code> object.
*/
public void modifyWithNullValues(
) throws Exception {
try {
} catch (Exception e) {
params);
e.printStackTrace();
throw e;
}
exiting("modifyWithNullValues");
}
public void assignMemberTwice(String parentRealm, String idType, String entityName) throws IdRepoException, SSOException {
try {
// add twice
} catch (SSOException e) {
params);
e.printStackTrace();
throw e;
} finally {
}
exiting("assignMemberTwice");
}
/**
* Adds and removes members from the <code>AMIdentity</code> object.
*
* @throws Exception if cannot access to <code>AMIdentity</code>
*/
public void assignUnassignMembers(
) throws Exception {
try {
} catch (Exception e) {
params);
e.printStackTrace();
throw e;
}
exiting("assignUnassignMembers");
}
/**
* Creates <code>AMIdentity</code> twice.
*
* @throws IdRepoException if <code>AMIdentity</code> object cannot be
* created.
* @throws SSOException if the super administrator Single Sign On is
* invalid.
*/
"entity-creation-attributes"})
public void createIdentityTwice(
) throws IdRepoException, SSOException {
try {
} catch (SSOException e) {
params);
e.printStackTrace();
throw e;
}
exiting("createIdentityTwice");
}
/**
* Creates <code>AMIdentity</code> twice with long name.
*
* @throws IdRepoException if <code>AMIdentity</code> object cannot be
* created.
* @throws SSOException if the super administrator Single Sign On is
* invalid.
*/
"entity-creation-attributes"})
public void createIdentityWithLongName(
) throws IdRepoException, SSOException {
try {
for (int i = 0; i < 100; i++) {
name += entityName;
}
} catch (SSOException e) {
params);
e.printStackTrace();
throw e;
}
exiting("createIdentityWithLongName");
}
/**
* Creates <code>AMIdentity</code> twice with no name.
*
* @throws IdRepoException if <code>AMIdentity</code> object cannot be
* created.
* @throws SSOException if the super administrator Single Sign On is
* invalid.
*/
public void createIdenityWithNoName(
) throws IdRepoException, SSOException {
try {
} catch (SSOException e) {
params);
e.printStackTrace();
throw e;
}
exiting("createIdenityWithNoName");
}
/**
* Set required values of required attributes in <code>AMIdentity</code>
* to null.
*
* @throws IdRepoException if <code>AMIdentity</code> object cannot be
* modified.
* @throws SSOException if the super administrator Single Sign On is
* invalid.
*/
"entity-required-attributes"})
public void nullifyRequiredAttribute(
) throws IdRepoException, SSOException {
try {
if (!setRequiredAttributes.isEmpty()) {
}
} catch (SSOException e) {
params);
e.printStackTrace();
throw e;
}
exiting("nullifyRequiredAttribute");
}
/**
* Removes membership of <code>AMIdentity</code> itself from it.
*
* @throws IdRepoException if membership removal failed.
* @throws SSOException if the super administrator Single Sign On is
* invalid.
*/
expectedExceptions={IdRepoException.class})
public void addItselfAsMember(
) throws IdRepoException, SSOException {
try {
} catch (SSOException e) {
e.printStackTrace();
throw e;
}
exiting("addItselfAsMember");
}
/**
* Tests <code>isExists</code> method.
*
* @throws Exception if cannot access to <code>AMIdentity</code> object.
*/
"entity-creation-attributes"})
public void verifyExistence(
) throws Exception {
try {
"exist", values);
assert a.isExists();
resultSets = repo.searchIdentities(type, entityName + "exist", new IdSearchControl()).getSearchResults();
assert resultSets.isEmpty();
} catch (Exception e) {
e.printStackTrace();
throw e;
} finally {
exiting("verifyExistence");
}
}
/**
* Removes <code>AMIdentity</code> object after suite test is
* done.
*
* @throws Exception if <code>AMIdenity</code> object cannot be deleted.
*/
public void tearDown(
) throws Exception {
try {
} catch (Exception e) {
e.printStackTrace();
throw e;
}
exiting("tearDown");
}
/**
* Removes realm after suite test is done.
*
* @throws SMSException if realm cannot be deleted.
* @throws SSOException if the super administrator Single Sign On is
* invalid.
*/
@Parameters({"parent-realms"})
throws SSOException, SMSException {
while (st.hasMoreElements()) {
}
exiting("suiteTearDown");
}
) throws IdRepoException, SSOException {
return amid;
}
) throws IdRepoException, SSOException {
}
throws IdRepoException, SSOException {
}
private void deleteIdentity(
) throws IdRepoException, SSOException {
new IdSearchControl());
assert resultSets.isEmpty();
}
) {
return set;
}
) throws IdRepoException, SSOException {
map);
}
if (idx == -1) {
}
}
throws SSOException, SMSException
{
try {
} catch (SMSException e) {
//ignore if the sub organization already exists.
}
}
}
throws SSOException
{
try {
} catch (SMSException e) {
//ignore if the sub organization already exists.
}
}
}
}