Examples of Belly


Examples of cucumber.runtime.arquillian.domain.Belly

import static org.junit.Assert.assertTrue;

public class BellyTest {
    @Test
    public void shouldBeHungry() {
        Belly belly = new Belly();
        belly.setCukes(0);
        assertTrue(belly.isHungry());
    }
View Full Code Here

Examples of cucumber.runtime.arquillian.domain.Belly

        assertTrue(belly.isHungry());
    }

    @Test
    public void shouldNotBeHungry() {
        Belly belly = new Belly();
        belly.setCukes(1);
        assertFalse(belly.isHungry());
    }
View Full Code Here

Examples of cucumber.runtime.arquillian.domain.Belly

public class BellyControllerTest {
    @Test
    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));
    }
View Full Code Here

Examples of cucumber.runtime.arquillian.domain.Belly

    }

    @Test
    public void shouldNotBeHungry() {
        FacesContext facesContext = mock(FacesContext.class);
        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)));
    }
View Full Code Here

Examples of cucumber.runtime.arquillian.domain.Belly

    }

    @When("^I eat (\\d+) cukes$")
    public void eatCukes(int cukes) {
        if (belly == null) {
            belly = new Belly();
        }
        belly.setCukes(cukes);
    }
View Full Code Here

Examples of cucumber.runtime.arquillian.domain.Belly

        belly.setCukes(cukes);
    }

    @Given("^I have a belly$")
    public void setUpBelly() {
        belly = new Belly();
    }
View Full Code Here

Examples of cucumber.runtime.arquillian.domain.Belly

        belly.setCukes(cukes);
    }

    @Given("^I have a belly$")
    public void setUpBelly() {
        belly = new Belly();
    }
View Full Code Here

Examples of cucumber.runtime.arquillian.domain.Belly

        belly.setCukes(cukes);
    }

    @Etantdonné("^I have a belly$")
    public void setUpBelly() {
        belly = new Belly();
    }
View Full Code Here

Examples of cucumber.runtime.arquillian.domain.Belly

        belly.setCukes(cukes);
    }

    @Given("^I have a belly$")
    public void setUpBelly() {
        belly = new Belly();
    }
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.