Package se.dannej.fakehttpserver.expect

Examples of se.dannej.fakehttpserver.expect.DummyFakeRequest


  private static final String UNEXPECTED_METHOD = "GET";
  private static final String EXPECTED_METHOD = "POST";

  @Test
  public void matchesReturnsFalseIfExpectedMethodNameDoesNotEqualMethodOfRequest() {
    DummyFakeRequest requestWithUnexpectedMethod = newRequest().withMethod(UNEXPECTED_METHOD);
    boolean result = headMatcher(EXPECTED_METHOD).matches(requestWithUnexpectedMethod);
    assertThat(result, is(false));
  }
View Full Code Here


    assertThat(result, is(false));
  }

  @Test
  public void matchesReturnsTrueIfExpectedMethodNameEqualsMethodOfRequest() {
    DummyFakeRequest requestWithExpectedMethod = newRequest().withMethod(EXPECTED_METHOD);
    boolean result = headMatcher(EXPECTED_METHOD).matches(requestWithExpectedMethod);
    assertThat(result, is(true));
  }
View Full Code Here

TOP

Related Classes of se.dannej.fakehttpserver.expect.DummyFakeRequest

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.