@Test public void testIsPostOrPut() throws Exception { HttpServerRequest req = mock(HttpServerRequest.class); when(req.method()).thenReturn(HttpMethod.POST); assertThat(HttpUtils.isPostOrPut(req)).isTrue(); when(req.method()).thenReturn(HttpMethod.PUT); assertThat(HttpUtils.isPostOrPut(req)).isTrue(); when(req.method()).thenReturn(HttpMethod.GET); assertThat(HttpUtils.isPostOrPut(req)).isFalse(); }
public static boolean isPostOrPut(HttpServerRequest request) { return request.method().name().equalsIgnoreCase(HttpMethod.POST.name()) || request.method().name().equalsIgnoreCase(HttpMethod.PUT.name()); }
HttpUtils { public static boolean isPostOrPut(HttpServerRequest request) { return request.method().name().equalsIgnoreCase(HttpMethod.POST.name()) || request.method().name().equalsIgnoreCase(HttpMethod.PUT.name()); } }
HttpUtils { public static boolean isPostOrPut(HttpServerRequest request) { return request.method().name().equalsIgnoreCase(HttpMethod.POST.name()) || request.method().name().equalsIgnoreCase(HttpMethod.PUT.name()); }  }
HttpUtils { public static boolean isPostOrPut(HttpServerRequest request) { return request.method().name().equalsIgnoreCase(HttpMethod.POST.name()) || request.method().name().equalsIgnoreCase(HttpMethod.PUT.name()); }  static boolean isKeepAlive(HttpServerRequest request); static int getStatusFromResult(Result result, boolean success); static InputStream processResult(ServiceAccessor accessor, Context context, Renderable renderable,
                                            Result result); static String getContentTypeFromContentTypeAndCharacterSetting(String rawContentType); static boolean isPostOrPut(HttpServerRequest request); }
HttpUtils { public static boolean isPostOrPut(HttpServerRequest request) { return request.method().name().equalsIgnoreCase(HttpMethod.POST.name()) || request.method().name().equalsIgnoreCase(HttpMethod.PUT.name()); }  static boolean isKeepAlive(HttpServerRequest request); static int getStatusFromResult(Result result, boolean success); static InputStream processResult(ServiceAccessor accessor, Context context, Renderable renderable,
                                            Result result); static String getContentTypeFromContentTypeAndCharacterSetting(String rawContentType); static boolean isPostOrPut(HttpServerRequest request); static final String CLOSE; static final String KEEP_ALIVE; }