Package jeeves.server.context

Examples of jeeves.server.context.ServiceContext


    }

    @Test
    public void testHarvest() throws Exception {
        assertEquals(0, _harvestHistoryRepository.count());
        final ServiceContext context = createServiceContext();
        loginAsAdmin(context);
        mockHttpRequests(_requestFactory);

        Element params = createHarvesterParams(_harvesterType);
        customizeParams(params);
View Full Code Here


    @Test
    public void testInsertData() throws Exception {
        TransactionlessTesting.get().run(new TestTask() {
            @Override
            public void run() throws Exception {
                ServiceContext context = createServiceContext();
                String filePath = getClassFile(DbLibIntegrationTest.class).getParentFile().getPath();
                String filePrefix = "db-test-";
                new DbLib().insertData(null, context, getWebappDir(DbLibIntegrationTest.class), filePath, filePrefix);
            }
        });
View Full Code Here

        constructor.setAccessible(true);
        GeonetContext gc = (GeonetContext) constructor.newInstance(_applicationContext, false, null, null);


        contexts.put(Geonet.CONTEXT_NAME, gc);
        final ServiceContext context = new ServiceContext("mockService", _applicationContext, contexts, _entityManager);
        context.setAsThreadLocal();
        context.setInputMethod(ServiceRequest.InputMethod.GET);
        context.setIpAddress("127.0.1");
        context.setLanguage("eng");
        context.setLogger(Log.createLogger("Test"));
        context.setMaxUploadSize(100);
        context.setOutputMethod(ServiceRequest.OutputMethod.DEFAULT);
        context.setAppPath(getWebappDir(getClass()));
        context.setBaseUrl("geonetwork");

        return context;
    }
View Full Code Here

*/
public class SchematronCriteriaGroupServiceIntegrationTest extends AbstractSchematronServiceIntegrationTest {

    @Test
    public void testExecListAll_ExcludeCriteriaAndSchematron() throws Exception {
        ServiceContext context = createServiceContext();
        loginAsAdmin(context);

        Element params = createParams();

        Element result = createService(LIST).exec(params, context);
View Full Code Here

    }

    @Test
    public void testExecListAll_IncludeCriteria() throws Exception {

        ServiceContext context = createServiceContext();
        loginAsAdmin(context);

        Element params = createParams(
                read(SchematronCriteriaGroupService.PARAM_INCLUDE_CRITERIA, Boolean.TRUE)
        );
View Full Code Here

        assertFullCriteria(result);
    }

    @Test
    public void testExecListAll_IncludeSchematron() throws Exception {
        ServiceContext context = createServiceContext();
        loginAsAdmin(context);

        Element params = createParams(
                read(SchematronCriteriaGroupService.PARAM_INCLUDE_SCHEMATRON, Boolean.TRUE)
        );
View Full Code Here

        assertCriteriaOnlyId(result);
    }

    @Test
    public void testExecListAll_IncludeSchematronAndCriteria() throws Exception {
        ServiceContext context = createServiceContext();
        loginAsAdmin(context);

        Element params = createParams(
                read(SchematronCriteriaGroupService.PARAM_INCLUDE_SCHEMATRON, Boolean.TRUE),
                read(SchematronCriteriaGroupService.PARAM_INCLUDE_CRITERIA, Boolean.TRUE)
View Full Code Here

        assertFullCriteria(result);
    }

    @Test
    public void testExecListOwnedBySchematron() throws Exception {
        ServiceContext context = createServiceContext();
        loginAsAdmin(context);

        Element params = createParams(
                read(SchematronCriteriaGroupService.PARAM_SCHEMATRON_ID, _group1_Name1_SchematronId1.getId().getSchematronId()),
                read(SchematronCriteriaGroupService.PARAM_INCLUDE_SCHEMATRON, Boolean.TRUE)
View Full Code Here

        assertNotSchematronIds(result, _group2_Name2_SchematronId2, _group4_Name2_SchematronId4);
    }

    @Test
    public void testExecListHasGroupName() throws Exception {
        ServiceContext context = createServiceContext();
        loginAsAdmin(context);

        Element params = createParams(
                read(SchematronCriteriaGroupService.PARAM_GROUP_NAME, _group2_Name2_SchematronId2.getId().getName()),
                read(SchematronCriteriaGroupService.PARAM_INCLUDE_SCHEMATRON, Boolean.TRUE)
View Full Code Here

        assertSchematronIds(result, _group2_Name2_SchematronId2, _group4_Name2_SchematronId4);
    }

    @Test
    public void testExecListOne() throws Exception {
        ServiceContext context = createServiceContext();
        loginAsAdmin(context);

        Element params = createParams(
                read(SchematronCriteriaGroupService.PARAM_GROUP_NAME, _group2_Name2_SchematronId2.getId().getName()),
                read(SchematronCriteriaGroupService.PARAM_SCHEMATRON_ID, _group2_Name2_SchematronId2.getId().getSchematronId())
View Full Code Here

TOP

Related Classes of jeeves.server.context.ServiceContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.