public void Repeated_calls_to_GetToken_for_the_same_command_return_the_same_value() { var command = new SubmitCode("123"); var token1 = command.GetOrCreateToken(); var token2 = command.GetOrCreateToken(); token2.Should().Be(token1); }
public void A_token_is_generated_on_demand() { var command = new SubmitCode("123"); command.GetOrCreateToken() .Should() .NotBeNullOrWhiteSpace(); }
public void Command_tokens_are_reproducible_given_the_same_seed() { var command1 = new SubmitCode("123"); command1.SetToken("the-token"); string token1 = command1.GetOrCreateToken(); var command2 = new SubmitCode("123"); command2.SetToken("the-token"); string token2 = command2.GetOrCreateToken(); token2.Should().Be(token1); }