use of org.forgerock.openam.entitlement.configuration.ResourceTypeConfiguration in project OpenAM by OpenRock.
the class UpgradeEntitlementSubConfigsStepTest method setUp.
@BeforeMethod
public void setUp() throws IllegalAccessException, InstantiationException {
mockTypes = new HashSet<ApplicationType>(3);
final ApplicationType type1 = newType("type1");
final ApplicationType type2 = newType("type2");
final ApplicationType type3 = newType("type3");
mockTypes.addAll(Arrays.asList(type1, type2, type3));
this.type1 = type1;
mockApplications = new HashSet<Application>(3);
final Application application1 = newApplication("application1", type1);
final Application application2 = newApplication("application2", type1);
final Application application3 = newApplication("application3", type1);
mockApplications.addAll(Arrays.asList(application1, application2, application3));
entitlementService = mock(EntitlementConfiguration.class);
adminTokenAction = mock(PrivilegedAction.class);
connectionFactory = mock(ConnectionFactory.class);
resourceTypeConfiguration = mock(ResourceTypeConfiguration.class);
upgradeStep = new SafeUpgradeEntitlementSubConfigsStep(entitlementService, resourceTypeConfiguration, adminTokenAction, connectionFactory);
final HashSet<String> conditions = new HashSet<String>();
conditions.add("condition.entry.1");
conditions.add("condition.entry.2");
final HashSet<String> subjects = new HashSet<String>();
subjects.add("subject.entry.1");
subjects.add("subject.entry.2");
final HashSet<String> resources = new HashSet<String>();
resources.add("http://*");
resources.add("https://*");
app = newApplication("application4", type1);
app.setConditions(conditions);
app.setSubjects(subjects);
app.setEntitlementCombinerName(DEFAULT_COMBINER);
}
Aggregations