Examples of InputAction


Examples of com.consol.citrus.actions.InputAction

        builder.execute();
       
        Assert.assertEquals(builder.testCase().getActions().size(), 1);
        Assert.assertEquals(builder.testCase().getActions().get(0).getClass(), InputAction.class);
       
        InputAction action = (InputAction)builder.testCase().getActions().get(0);
        Assert.assertEquals(action.getName(), "input");
        Assert.assertEquals(action.getMessage(), "TestMessage");
        Assert.assertEquals(action.getValidAnswers(), "Yes/No/Maybe");
        Assert.assertEquals(action.getVariable(), "TestVariable");
    }
View Full Code Here

Examples of com.consol.citrus.actions.InputAction

    @Test
    public void testInputActionParser() {
        assertActionCount(4);
        assertActionClassAndName(InputAction.class, "input");
       
        InputAction action = getNextTestActionFromTest();
        Assert.assertEquals(action.getMessage(), "Press return key to continue ...");
        Assert.assertNull(action.getValidAnswers());
        Assert.assertEquals(action.getVariable(), "userinput");
       
        action = getNextTestActionFromTest();
        Assert.assertEquals(action.getMessage(), "Do you want to continue?");
        Assert.assertNull(action.getValidAnswers());
        Assert.assertEquals(action.getVariable(), "userinput");
       
        action = getNextTestActionFromTest();
        Assert.assertEquals(action.getMessage(), "Do you want to continue?");
        Assert.assertEquals(action.getValidAnswers(), "yes/no");
        Assert.assertEquals(action.getVariable(), "userinput");
       
        action = getNextTestActionFromTest();
        Assert.assertEquals(action.getMessage(), "Do you want to continue?");
        Assert.assertEquals(action.getValidAnswers(), "y/n");
        Assert.assertEquals(action.getVariable(), "inputVar");
    }
View Full Code Here

Examples of org.jenkinsci.plugins.workflow.support.steps.input.InputAction

        while (b.getAction(InputAction.class)==null) {
            e.waitForSuspension();
        }

        // make sure we are pausing at the right state that reflects what we wrote in the program
        InputAction a = b.getAction(InputAction.class);
        assertEquals(1, a.getExecutions().size());

        InputStepExecution is = a.getExecution("Icecream");
        assertEquals("Do you want chocolate?", is.getInput().getMessage());
        assertEquals(1, is.getInput().getParameters().size());

        j.assertEqualDataBoundBeans(is.getInput().getParameters().get(0), new BooleanParameterDefinition("chocolate", false, "Favorite icecream flavor"));

        // submit the input, and run workflow to the completion
        HtmlPage p = j.createWebClient().getPage(b, a.getUrlName());
        j.submit(p.getFormByName(is.getId()),"proceed");
        assertEquals(0, a.getExecutions().size());
        q.get();

        // make sure 'x' gets assigned to false
        System.out.println(b.getLog());
        assertTrue(b.getLog().contains("after: false"));
View Full Code Here

Examples of org.terasology.input.device.InputAction

            if (Keyboard.isRepeatEvent()) {
                state = ButtonState.REPEAT;
            } else {
                state = (Keyboard.getEventKeyState()) ? ButtonState.DOWN : ButtonState.UP;
            }
            result.add(new InputAction(InputType.KEY.getInput(Keyboard.getEventKey()), state, Keyboard.getEventCharacter()));
        }

        return result;
    }
View Full Code Here

Examples of org.terasology.input.device.InputAction

        Queue<InputAction> result = Queues.newArrayDeque();

        while (Mouse.next()) {
            if (Mouse.getEventButton() != -1) {
                ButtonState state = (Mouse.getEventButtonState()) ? ButtonState.DOWN : ButtonState.UP;
                result.add(new InputAction(InputType.MOUSE_BUTTON.getInput(Mouse.getEventButton()), state, getPosition()));
            }
            if (Mouse.getEventDWheel() != 0) {
                int id = (Mouse.getEventDWheel() > 0) ? 1 : -1;
                result.add(new InputAction(InputType.MOUSE_WHEEL.getInput(id), id * Mouse.getEventDWheel() / 120, getPosition()));
            }
        }

        return result;
    }
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.