rundata = RunDataFactory.getRunData( request, response, config );
assertNotNull( "Got rundata", rundata);
TurbineTestUtilities.setupRunData(rundata);
// Verify we have a profile
Profile profile = Profiler.getProfile(rundata);
assertNotNull( "Got profile from Profiler", profile);
// Verify the profile location information in the profile
if (profile instanceof ProfileLocator)
{
currentLocator = (ProfileLocator) profile;
}
newLocator = Profiler.createLocator();
newLocator.setGroupByName(TEST_GROUP);
newLocator.setMediaType(currentLocator.getMediaType());
newLocator.setName(TEST_SECURITY_PAGE);
// Create portlet set
portlets = new PsmlPortlets();
controller = new PsmlController();
controller.setName("RowController");
portlets.setController(controller);
skin = new PsmlSkin();
skin.setName("orange-red");
portlets.setSkin(skin);
rootPortletSet = portlets;
portlets = new PsmlPortlets();
// Add entries
portlets.addEntry( createEntry(ALL_PORTLET, "ST_01.all"));
portlets.addEntry( createEntry(USER_PORTLET, "ST_01.user"));
portlets.addEntry( createEntry(ADMIN_PORTLET, "ST_01.admin"));
rootPortletSet.addPortlets(portlets);
Profile newProfile = Profiler.createProfile(newLocator, rootPortletSet);
PSMLDocument doc = newProfile.getDocument();
System.out.println("doc = " + doc.getName());
// this only works with the default configuration (Castor/Filebased)
File file = new File(doc.getName());
assertTrue(file.exists());