Examples of StepRegistry


Examples of org.springframework.batch.core.configuration.StepRegistry

    private static final String EXCEPTION_NOT_THROWN_MSG = "An exception should have been thrown";

    @Test
    public void registerStepEmptyCollection() throws DuplicateJobException {
        final StepRegistry stepRegistry = createRegistry();

        launchRegisterGetRegistered(stepRegistry, "myJob", getStepCollection());
    }
View Full Code Here

Examples of org.springframework.batch.core.configuration.StepRegistry

        launchRegisterGetRegistered(stepRegistry, "myJob", getStepCollection());
    }

    @Test
    public void registerStepNullJobName() throws DuplicateJobException {
        final StepRegistry stepRegistry = createRegistry();

        try {
            stepRegistry.register(null, new HashSet<Step>());
            Assert.fail(EXCEPTION_NOT_THROWN_MSG);
        } catch (IllegalArgumentException e) {
        }
    }
View Full Code Here

Examples of org.springframework.batch.core.configuration.StepRegistry

        }
    }

    @Test
    public void registerStepNullSteps() throws DuplicateJobException {
        final StepRegistry stepRegistry = createRegistry();

        try {
            stepRegistry.register("fdsfsd", null);
            Assert.fail(EXCEPTION_NOT_THROWN_MSG);
        } catch (IllegalArgumentException e) {
        }
    }
View Full Code Here

Examples of org.springframework.batch.core.configuration.StepRegistry

        }
    }

    @Test
    public void registerStepGetStep() throws DuplicateJobException {
        final StepRegistry stepRegistry = createRegistry();

        launchRegisterGetRegistered(stepRegistry, "myJob",
                getStepCollection(
                        createStep("myStep"),
                        createStep("myOtherStep"),
View Full Code Here

Examples of org.springframework.batch.core.configuration.StepRegistry

                ));
    }

    @Test
    public void getJobNotRegistered() throws DuplicateJobException {
        final StepRegistry stepRegistry = createRegistry();

        final String aStepName = "myStep";
        launchRegisterGetRegistered(stepRegistry, "myJob",
                getStepCollection(
                        createStep(aStepName),
View Full Code Here

Examples of org.springframework.batch.core.configuration.StepRegistry

        assertJobNotRegistered(stepRegistry, "a ghost");
    }

    @Test
    public void getJobNotRegisteredNoRegistration() {
        final StepRegistry stepRegistry = createRegistry();

        assertJobNotRegistered(stepRegistry, "a ghost");
    }
View Full Code Here

Examples of org.springframework.batch.core.configuration.StepRegistry

        assertJobNotRegistered(stepRegistry, "a ghost");
    }

    @Test
    public void getStepNotRegistered() throws DuplicateJobException {
        final StepRegistry stepRegistry = createRegistry();

        final String jobName = "myJob";
        launchRegisterGetRegistered(stepRegistry, jobName,
                getStepCollection(
                        createStep("myStep"),
View Full Code Here

Examples of org.springframework.batch.core.configuration.StepRegistry

        assertStepNameNotRegistered(stepRegistry, jobName, "fsdfsdfsdfsd");
    }

    @Test
    public void registerTwice() throws DuplicateJobException {
        final StepRegistry stepRegistry = createRegistry();

        final String jobName = "myJob";
        final Collection<Step> stepsFirstRegistration = getStepCollection(
                createStep("myStep"),
                createStep("myOtherStep"),
                createStep("myThirdStep")
        );

        // first registration
        launchRegisterGetRegistered(stepRegistry, jobName, stepsFirstRegistration);


        // Second registration with same name should fail
        try {
            stepRegistry.register(jobName, getStepCollection(
                    createStep("myFourthStep"),
                    createStep("lastOne")));
            fail("Should have failed with a "+DuplicateJobException.class.getSimpleName());
        } catch (DuplicateJobException e) {
            // OK
View Full Code Here

Examples of org.springframework.batch.core.configuration.StepRegistry

        }
    }

    @Test
    public void getStepNullJobName() throws NoSuchJobException {
        final StepRegistry stepRegistry = createRegistry();

        try {
            stepRegistry.getStep(null, "a step");
            Assert.fail(EXCEPTION_NOT_THROWN_MSG);
        } catch (IllegalArgumentException e) {
        }
    }
View Full Code Here

Examples of org.springframework.batch.core.configuration.StepRegistry

        }
    }

    @Test
    public void getStepNullStepName() throws NoSuchJobException, DuplicateJobException {
        final StepRegistry stepRegistry = createRegistry();

        final String stepName = "myStep";
        launchRegisterGetRegistered(stepRegistry, "myJob", getStepCollection(createStep(stepName)));

        try {
            stepRegistry.getStep(null, stepName);
            Assert.fail(EXCEPTION_NOT_THROWN_MSG);
        } catch (IllegalArgumentException e) {
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.