Package org.mockserver.verify

Examples of org.mockserver.verify.VerificationTimes


public class VerificationTimesTest {

    @Test
    public void shouldCreateCorrectObjectForAtLeast() {
        // when
        VerificationTimes times = atLeast(2);

        // then
        assertThat(times.isExact(), is(false));
        assertThat(times.getCount(), is(2));
    }
View Full Code Here


    }

    @Test
    public void shouldCreateCorrectObjectForExactly() {
        // when
        VerificationTimes times = exactly(2);

        // then
        assertThat(times.isExact(), is(true));
        assertThat(times.getCount(), is(2));
    }
View Full Code Here

        assertThat(times.getCount(), is(2));
    }
    @Test
    public void shouldCreateCorrectObjectForOnce() {
        // when
        VerificationTimes times = once();

        // then
        assertThat(times.isExact(), is(true));
        assertThat(times.getCount(), is(1));
    }
View Full Code Here

    @Test
    public void shouldReturnValueSetInSetter() {
        // when
        HttpRequest request = request();
        VerificationTimes times = atLeast(2);
        Verification verification = new Verification()
                .withRequest(request)
                .withTimes(times);

        // then
View Full Code Here

    }

    @Test
    public void shouldBuildCorrectObject() {
        // when
        VerificationTimes times = new VerificationTimesDTO(VerificationTimes.once()).buildObject();

        // then
        assertThat(times.getCount(), is(1));
        assertThat(times.isExact(), is(true));

        // when
        times = new VerificationTimesDTO(VerificationTimes.exactly(3)).buildObject();

        // then
        assertThat(times.getCount(), is(3));
        assertThat(times.isExact(), is(true));

        // when
        times = new VerificationTimesDTO(VerificationTimes.atLeast(3)).buildObject();

        // then
        assertThat(times.getCount(), is(3));
        assertThat(times.isExact(), is(false));
    }
View Full Code Here

    @Test
    public void shouldReturnValueSetInConstructor() {
        // given
        HttpRequest request = request();
        VerificationTimes times = VerificationTimes.atLeast(1);
        Verification verification = new Verification()
                .withRequest(request)
                .withTimes(times);

        // when
View Full Code Here

    @Test
    public void shouldBuildObject() {
        // given
        HttpRequest request = request();
        VerificationTimes times = VerificationTimes.atLeast(1);
        Verification verification = new Verification()
                .withRequest(request)
                .withTimes(times);

        // when
View Full Code Here

TOP

Related Classes of org.mockserver.verify.VerificationTimes

Copyright © 2018 www.massapicom. 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.