APISonar


org.mockserver.model.HttpForward.Scheme.HTTP

> org > mockserver > model > HttpForward > Scheme > HTTP
org APIs mockserver APIs model APIs HttpForward APIs Scheme APIs HTTP APIs

Example 1
public void shouldHandleNullFieldInput() {
        // when
        HttpForwardDTO httpForwardDTO = new HttpForwardDTO(new HttpForward());

        // then
        assertThat(httpForwardDTO.getHost(), is(nullValue()));
        assertThat(httpForwardDTO.getPort(), is(80));
        assertThat(httpForwardDTO.getScheme(), is(HttpForward.Scheme.HTTP));
    }
Example 2
public HttpForward buildObject() {
        Delay delay = null;
        if (this.delay != null) {
            delay = this.delay.buildObject();
        }
        return new HttpForward()
            .withHost(host)
            .withPort(port != null ? port : 80)
            .withScheme((scheme != null ? scheme : HttpForward.Scheme.HTTP))
            .withDelay(delay);
    }