Skip to content

Commit

Permalink
Merge branch 'jmhHttpLogFormatter' of https://github.com/skjolber/log…
Browse files Browse the repository at this point in the history
…book into jmhHttpLogFormatter
  • Loading branch information
skjolber committed Jun 4, 2019
2 parents 49fb75c + 765b5f5 commit 9bf4d2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.zalando.logbook.RequestURI.Component;

import java.util.EnumSet;
import java.util.Optional;
Expand Down Expand Up @@ -102,7 +103,7 @@ void shouldReconstructWithoutSchemeAuthorityAndPath() {

@Test
void shouldUseComponentValueOf() {
RequestURI.Component.valueOf("SCHEME");
Component.valueOf("SCHEME");
}

@Test
Expand All @@ -113,13 +114,13 @@ void shouldUseOriginValueOf() {
@Test
void shouldReconstructUsingBuilder() {
StringBuilder builder = new StringBuilder();
RequestURI.reconstruct(request, builder);
reconstruct(request, builder);
assertThat(builder.toString(), is("http://localhost/admin?limit=1"));
}

@Test
void shouldReconstructSpecificComponents() {
String r = RequestURI.reconstruct(request, EnumSet.of(RequestURI.Component.SCHEME, RequestURI.Component.AUTHORITY, RequestURI.Component.PATH));
String r = reconstruct(request, EnumSet.of(SCHEME, AUTHORITY, PATH));
assertThat(r, is("http://localhost/admin"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
Expand Down

0 comments on commit 9bf4d2a

Please sign in to comment.