Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsolete TODOs #84

Merged
merged 1 commit into from
May 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,4 @@ public void noneShouldDefaultToNoOp() {
is(equalTo("Bearer c61a8f84-6834-11e5-a607-10ddb1ee7671")));
}

// TODO migrate!
// @Test
// public void compoundShouldObfuscateMultipleTimes() {
// final HeaderObfuscator unit = HeaderObfuscator.compound(
// (key, value) -> "XXX".equals(value) ? "YYY" : value,
// (key, value) -> "Authorization".equalsIgnoreCase(key) ? "XXX" : value);
//
// assertThat(unit.obfuscate("Authorization", "Bearer c61a8f84-6834-11e5-a607-10ddb1ee7671"),
// is(equalTo("YYY")));
// }
//
// @Test
// public void compoundShouldObfuscateOnlyMatchingEntries() {
// final HeaderObfuscator unit = HeaderObfuscator.compound(
// (key, value) -> "XXX".equals(value) ? "YYY" : value,
// (key, value) -> "password".equals(key) ? "<secret>" : value, // this won't be used
// (key, value) -> "Authorization".equalsIgnoreCase(key) ? "XXX" : value);
//
// assertThat(unit.obfuscate("Authorization", "Bearer c61a8f84-6834-11e5-a607-10ddb1ee7671"),
// is(equalTo("YYY")));
// }

}
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,4 @@ public void noneShouldDefaultToNoOp() {
assertThat(unit.obfuscate("a=b&c=d&f=e"), is(equalTo("a=b&c=d&f=e")));
}

// TODO migrate
// @Test
// public void compoundShouldObfuscateMultipleTimes() {
// final QueryObfuscator unit = QueryObfuscator.compound(
// query -> query.replace("secure", "XXX"),
// query -> query.replace("s3cr3t", "XXX"));
//
// assertThat(unit.obfuscate("password=s3cr3t&access_token=secure"), is("password=XXX&access_token=XXX"));
// }

}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public Logbook create(
@Nullable final HttpLogWriter writer) {


final HeaderObfuscator header = firstNonNull(headerObfuscator, authorization()); // TODO test default
final HeaderObfuscator header = firstNonNull(headerObfuscator, authorization());
final BodyObfuscator body = firstNonNull(bodyObfuscator, BodyObfuscator.none());

return new DefaultLogbook(
Expand All @@ -61,7 +61,7 @@ private RequestObfuscator combine(
final BodyObfuscator bodyObfuscator,
@Nullable final RequestObfuscator requestObfuscator) {

final QueryObfuscator query = firstNonNull(queryObfuscator, accessToken()); // TODO test default
final QueryObfuscator query = firstNonNull(queryObfuscator, accessToken());

return RequestObfuscator.merge(
firstNonNull(requestObfuscator, RequestObfuscator.none()),
Expand Down