use of org.springframework.boot.cli.command.status.ExitStatus in project spring-boot by spring-projects.
the class EncodePasswordCommandTests method encodeWithPbkdf2ShouldUsePbkdf2.
@Test
void encodeWithPbkdf2ShouldUsePbkdf2() throws Exception {
EncodePasswordCommand command = new EncodePasswordCommand();
ExitStatus status = command.run("-a", "pbkdf2", "boot");
then(this.log).should().info(this.message.capture());
assertThat(this.message.getValue()).doesNotStartWith("{");
assertThat(new Pbkdf2PasswordEncoder().matches("boot", this.message.getValue())).isTrue();
assertThat(status).isEqualTo(ExitStatus.OK);
}
Aggregations