Package jeeves.server.context

Examples of jeeves.server.context.ServiceContext


        assertNotGroupNames(result, _group1_Name1_SchematronId1, _group3_Name3_SchemtronId1);
        assertNotSchematronIds(result, _group1_Name1_SchematronId1, _group4_Name2_SchematronId4);
    }
    @Test
    public void testExecExists() 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


        return service;
    }

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

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

        assertSchematronIds(result, _group2_Name2_SchematronId2, _group3_Name3_SchemtronId1, _group4_Name2_SchematronId4);
    }

    @Test (expected = BadParameterEx.class)
    public void testExecDeleteBadGroupName() throws Exception {
        ServiceContext context = createServiceContext();
        loginAsAdmin(context);

        Element deleteParams = createParams(
                read(SchematronCriteriaGroupService.PARAM_GROUP_NAME, _group1_Name1_SchematronId1.getId().getName()+"asfasfd"),
                read(SchematronCriteriaGroupService.PARAM_SCHEMATRON_ID, _group1_Name1_SchematronId1.getId().getSchematronId())
View Full Code Here

        createService(DELETE).exec(deleteParams, context);
    }

    @Test (expected = BadParameterEx.class)
    public void testExecDeleteBadSchematronId() throws Exception {
        ServiceContext context = createServiceContext();
        loginAsAdmin(context);

        Element deleteParams = createParams(
                read(SchematronCriteriaGroupService.PARAM_GROUP_NAME, _group1_Name1_SchematronId1.getId().getName()),
                read(SchematronCriteriaGroupService.PARAM_SCHEMATRON_ID, _group1_Name1_SchematronId1.getId().getSchematronId()+1000)
View Full Code Here

        createService(DELETE).exec(deleteParams, context);
    }

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

        final String newName = "NewName" + _inc.incrementAndGet();
        final String requirement = SchematronRequirement.REPORT_ONLY.name();
        final int schematronId = _group1_Name1_SchematronId1.getId().getSchematronId();
View Full Code Here

        assertEquals(requirement, result.getChild(GeonetEntity.RECORD_EL_NAME).getChildText("requirement"));
    }

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

        SchematronRequirement newRequirement = SchematronRequirement.DISABLED;
        if (_group1_Name1_SchematronId1.getRequirement() == SchematronRequirement.DISABLED) {
            newRequirement = SchematronRequirement.REQUIRED;
View Full Code Here

    }

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


        final String newGroupName = "newGroupName";
        Element editParams = createParams(
View Full Code Here

        assertEquals(_group1_Name1_SchematronId1.getCriteria().size(), result.getChild("record").getChild("criteria").getChildren().size());
    }

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


        SchematronRequirement newRequirement = SchematronRequirement.REPORT_ONLY;
        if (_group1_Name1_SchematronId1.getRequirement() == newRequirement) {
View Full Code Here

    }

    @Test
    public void testExecEditSchematronId() throws Exception {
        Schematron newSchematron = _schematronRepository.save(SchematronRepositoryTest.newSchematron(_inc));
        ServiceContext context = createServiceContext();
        loginAsAdmin(context);


        Element editParams = createParams(
                read(SchematronCriteriaGroupService.PARAM_GROUP_NAME, _group1_Name1_SchematronId1.getId().getName()),
View Full Code Here

    public void testDataManagerCutpoints() throws Exception {
        TransactionlessTesting.get().run
                (new TestTask() {
                    @Override
                    public void run() throws Exception {
                        final ServiceContext serviceContext = createServiceContext();
                        loginAsAdmin(serviceContext);

                        final Element sampleMetadataXml = getSampleMetadataXml();
                        final UserSession userSession = serviceContext.getUserSession();
                        final int userIdAsInt = userSession.getUserIdAsInt();
                        final String mdId = _dataManager.insertMetadata(serviceContext, "iso19139", sampleMetadataXml,
                                "uuid" + _inc.incrementAndGet(), userIdAsInt, "2", "source",
                                MetadataType.METADATA.codeString, null, "maps", new ISODate().getDateAndTime(),
                                new ISODate().getDateAndTime(), false, false);
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.