Search in sources :

Example 1 with ExternalSubscribedFragments

use of org.apereo.portal.io.xml.subscribedfragment.ExternalSubscribedFragments in project uPortal by Jasig.

the class IdentityImportExportTest method testSubscribedFragment40ImportExport.

@Test
public void testSubscribedFragment40ImportExport() throws Exception {
    runSql("INSERT INTO UP_USER (USER_ID, USER_NAME, USER_DFLT_USR_ID, USER_DFLT_LAY_ID, NEXT_STRUCT_ID, LST_CHAN_UPDT_DT) " + "VALUES (1, 'admin', 0, 0, 0, null)");
    runSql("INSERT INTO UP_USER (USER_ID, USER_NAME, USER_DFLT_USR_ID, USER_DFLT_LAY_ID, NEXT_STRUCT_ID, LST_CHAN_UPDT_DT) " + "VALUES (2, 'mum-lo-campus-apps', 0, 0, 0, null)");
    runSql("INSERT INTO UP_USER (USER_ID, USER_NAME, USER_DFLT_USR_ID, USER_DFLT_LAY_ID, NEXT_STRUCT_ID, LST_CHAN_UPDT_DT) " + "VALUES (3, 'mum-lo-cg', 0, 0, 0, null)");
    final ClassPathResource permissionOwnerResource = new ClassPathResource("/org/apereo/portal/io/xml/subscribed-fragment/test_4-0.subscribed-fragment.xml");
    IdentityImportExportTestUtilities.testIdentityImportExport(this.transactionOperations, this.subscribedFragmentImporter, this.subscribedFragmentExporter, permissionOwnerResource, new Function<ExternalSubscribedFragments, String>() {

        @Override
        public String apply(ExternalSubscribedFragments input) {
            return input.getUsername();
        }
    });
}
Also used : ExternalSubscribedFragments(org.apereo.portal.io.xml.subscribedfragment.ExternalSubscribedFragments) Matchers.anyString(org.mockito.Matchers.anyString) ClassPathResource(org.springframework.core.io.ClassPathResource) Test(org.junit.Test) BasePortalJpaDaoTest(org.apereo.portal.test.BasePortalJpaDaoTest)

Aggregations

ExternalSubscribedFragments (org.apereo.portal.io.xml.subscribedfragment.ExternalSubscribedFragments)1 BasePortalJpaDaoTest (org.apereo.portal.test.BasePortalJpaDaoTest)1 Test (org.junit.Test)1 Matchers.anyString (org.mockito.Matchers.anyString)1 ClassPathResource (org.springframework.core.io.ClassPathResource)1