Examples of eatCukes()


Examples of cucumber.runtime.arquillian.controller.BellyController.eatCukes()

    public void shouldBeHungry() {
        FacesContext facesContext = mock(FacesContext.class);
        BellyController controller = new BellyController(facesContext, new Belly());
        MessageAnswer answer = new MessageAnswer();
        doAnswer(answer).when(facesContext).addMessage(anyString(), any(FacesMessage.class));
        controller.eatCukes();
        assertThat(answer.getMessage(), equalTo(MSG_ERROR_HUNGRY));
    }

    @Test
    public void shouldNotBeHungry() {
View Full Code Here

Examples of cucumber.runtime.arquillian.controller.BellyController.eatCukes()

        Belly belly = new Belly();
        BellyController controller = new BellyController(facesContext, belly);
        MessageAnswer answer = new MessageAnswer();
        doAnswer(answer).when(facesContext).addMessage(anyString(), any(FacesMessage.class));
        belly.setCukes(3);
        controller.eatCukes();
        assertThat(answer.getMessage(), equalTo(format(MSG_SUCCESS_NOT_HUNGRY, 3)));
    }

    private static class MessageAnswer implements Answer<Object> {
        private String message;
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.