Examples of IGerritHudsonTriggerConfig


Examples of com.sonyericsson.hudson.plugins.gerrit.trigger.config.IGerritHudsonTriggerConfig

     */
    @Parameters
    public static Collection getParameters() {
        List<TestParameters[]> list = new LinkedList<TestParameters[]>();

        IGerritHudsonTriggerConfig config = Setup.createConfig();

        //SUCCESS, FAILURE, ABORTED, UNSTABLE, other
        //not overridden, overridden

        //SUCCESS Not overridden
View Full Code Here

Examples of com.sonyericsson.hudson.plugins.gerrit.trigger.config.IGerritHudsonTriggerConfig

        AbstractBuild r = Setup.createBuild(project, taskListener, Setup.createEnvVars());

        PatchsetCreated event = Setup.createPatchsetCreated();
        BuildsStartedStats stats = Setup.createBuildStartedStats(event);
        IGerritHudsonTriggerConfig config = Setup.createConfig();

        Hudson hudson = PowerMockito.mock(Hudson.class);
        when(hudson.getRootUrl()).thenReturn("http://localhost/");

        PowerMockito.mockStatic(GerritMessageProvider.class);
View Full Code Here

Examples of com.sonyericsson.hudson.plugins.gerrit.trigger.config.IGerritHudsonTriggerConfig

    /**
     * test.
     */
    @Test
    public void testGetMinimumVerifiedValue() {
        IGerritHudsonTriggerConfig config = Setup.createConfig();

        ParameterExpander instance = new ParameterExpander(config);
        MemoryImprint memoryImprint = mock(MemoryImprint.class);
        MemoryImprint.Entry[] entries = new MemoryImprint.Entry[4];

View Full Code Here

Examples of com.sonyericsson.hudson.plugins.gerrit.trigger.config.IGerritHudsonTriggerConfig

    /**
     * test.
     */
    @Test
    public void testGetMinimumCodeReviewValue() {
        IGerritHudsonTriggerConfig config = Setup.createConfig();

        ParameterExpander instance = new ParameterExpander(config);
        MemoryImprint memoryImprint = mock(MemoryImprint.class);
        MemoryImprint.Entry[] entries = new MemoryImprint.Entry[4];

View Full Code Here

Examples of com.sonyericsson.hudson.plugins.gerrit.trigger.config.IGerritHudsonTriggerConfig

     *
     * @see com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger#getSkipVote()
     */
    @Test
    public void testGetMinimumCodeReviewValueOneUnstableSkipped() {
        IGerritHudsonTriggerConfig config = Setup.createConfig();

        ParameterExpander instance = new ParameterExpander(config);
        MemoryImprint memoryImprint = mock(MemoryImprint.class);
        MemoryImprint.Entry[] entries = new MemoryImprint.Entry[3];

View Full Code Here

Examples of com.sonyericsson.hudson.plugins.gerrit.trigger.config.IGerritHudsonTriggerConfig

     *
     * @see com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger#getSkipVote()
     */
    @Test
    public void testGetMinimumCodeReviewValueOneSuccessfulSkipped() {
        IGerritHudsonTriggerConfig config = Setup.createConfig();

        ParameterExpander instance = new ParameterExpander(config);
        MemoryImprint memoryImprint = mock(MemoryImprint.class);
        MemoryImprint.Entry[] entries = new MemoryImprint.Entry[1];

View Full Code Here

Examples of com.sonyericsson.hudson.plugins.gerrit.trigger.config.IGerritHudsonTriggerConfig

    public void tryGetBuildCompletedCommandSuccessfulEvent(String customUrl, String expectedBuildsStats,
            GerritTriggeredEvent event, int expectedVerifiedVote,
            int expectedCodeReviewVote)
                    throws IOException, InterruptedException {

        IGerritHudsonTriggerConfig config = Setup.createConfig();

        Hudson hudson = PowerMockito.mock(Hudson.class);
        when(hudson.getRootUrl()).thenReturn("http://localhost/");

        TaskListener taskListener = mock(TaskListener.class);
View Full Code Here

Examples of com.sonyericsson.hudson.plugins.gerrit.trigger.config.IGerritHudsonTriggerConfig

     * @param failureMessage Build failure message
     * @param expectedBuildStats Expected build stats string
     * @throws Exception if so
     */
    public void tryBuildStatsFailureCommand(String failureMessage, String expectedBuildStats) throws Exception {
        IGerritHudsonTriggerConfig config = Setup.createConfig();

        Hudson hudson = PowerMockito.mock(Hudson.class);
        when(hudson.getRootUrl()).thenReturn("http://localhost/");

        TaskListener taskListener = mock(TaskListener.class);
View Full Code Here

Examples of com.sonyericsson.hudson.plugins.gerrit.trigger.config.IGerritHudsonTriggerConfig

        PatchsetCreated event = Setup.createPatchsetCreated();

        BuildMemory memory = new BuildMemory();
        memory.completed(event, build);

        IGerritHudsonTriggerConfig config = mock(IGerritHudsonTriggerConfig.class);

        String parameterString = "gerrit review MSG=OK VERIFIED=<VERIFIED> CODEREVIEW=<CODE_REVIEW>";
        when(config.getGerritCmdBuildSuccessful()).thenReturn(parameterString);
        when(config.getGerritBuildSuccessfulVerifiedValue()).thenReturn(1);
        when(config.getGerritBuildSuccessfulCodeReviewValue()).thenReturn(1);

        GerritNotifier notifier = new GerritNotifier(config, mockGerritCmdRunner, hudson);
        notifier.buildCompleted(memory.getMemoryImprint(event), taskListener);
        String parameterStringExpected = "gerrit review MSG=OK VERIFIED=1 CODEREVIEW=1";
View Full Code Here

Examples of com.sonyericsson.hudson.plugins.gerrit.trigger.config.IGerritHudsonTriggerConfig

        PatchsetCreated event = Setup.createPatchsetCreated();

        BuildMemory memory = new BuildMemory();
        memory.completed(event, build);

        IGerritHudsonTriggerConfig config = mock(IGerritHudsonTriggerConfig.class);

        String parameterString = "gerrit review MSG=Failed VERIFIED=<VERIFIED> CODEREVIEW=<CODE_REVIEW>";
        when(config.getGerritCmdBuildFailed()).thenReturn(parameterString);
        when(config.getGerritBuildFailedVerifiedValue()).thenReturn(-1);
        when(config.getGerritBuildFailedCodeReviewValue()).thenReturn(-1);

        GerritNotifier notifier = new GerritNotifier(config, mockGerritCmdRunner, hudson);
        notifier.buildCompleted(memory.getMemoryImprint(event), taskListener);
        String parameterStringExpected = "gerrit review MSG=Failed VERIFIED=-1 CODEREVIEW=-1";
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.