use of org.junit.platform.commons.util.ToStringBuilder in project cas by apereo.
the class MessageSanitizationUtilsTests method verifyOperation.
@Test
public void verifyOperation() {
var results = MessageSanitizationUtils.sanitize("ticket TGT-1-abcdefg created");
assertTrue(results.contains("TGT-1-*****"));
results = MessageSanitizationUtils.sanitize("ticket PGT-1-abcdefg created");
assertTrue(results.contains("PGT-1-*****"));
results = MessageSanitizationUtils.sanitize("ticket PGTIOU-1-abcdefg created");
assertTrue(results.contains("PGTIOU-1-*****"));
results = MessageSanitizationUtils.sanitize("ticket OC-1-abcdefg created");
assertTrue(results.contains("OC-1-*****"));
results = MessageSanitizationUtils.sanitize("ticket AT-1-abcdefg created");
assertTrue(results.contains("AT-1-*****"));
results = MessageSanitizationUtils.sanitize("found a [password =se!ns4357$##@@**it!!_ive] here...");
assertTrue(results.contains("[password =*****"));
results = MessageSanitizationUtils.sanitize(new ToStringBuilder(this).append("password", "abcdefgs").append("field", "value").toString());
assertTrue(results.contains("password = *****"));
results = MessageSanitizationUtils.sanitize("found a [token=mgf63isnfb1s!!#ut0__|] here...");
assertTrue(results.contains("[token=*****"));
results = MessageSanitizationUtils.sanitize("found a ,clientSecret = p@$$wordSecret...");
assertTrue(results.contains(",clientSecret = *****..."));
}
use of org.junit.platform.commons.util.ToStringBuilder in project junit5 by junit-team.
the class ReportEntry method toString.
@Override
public String toString() {
ToStringBuilder builder = new ToStringBuilder(this);
builder.append("timestamp", this.timestamp);
this.keyValuePairs.forEach(builder::append);
return builder.toString();
}
use of org.junit.platform.commons.util.ToStringBuilder in project junit5 by junit-team.
the class LauncherConfigurationParameters method toString.
@Override
public String toString() {
ToStringBuilder builder = new ToStringBuilder(this);
this.explicitConfigParams.forEach(builder::append);
// @formatter:off
this.configParamsFromFile.stringPropertyNames().stream().filter(key -> !this.explicitConfigParams.containsKey(key)).forEach(key -> builder.append(key, this.configParamsFromFile.getProperty(key)));
return builder.toString();
}
Aggregations