예제 #1
0
        public void Repeated_calls_to_GetToken_for_the_same_command_return_the_same_value()
        {
            var command = new SubmitCode("123");

            var token1 = command.GetToken();
            var token2 = command.GetToken();

            token2.Should().Be(token1);
        }
예제 #2
0
        public void A_token_is_generated_on_demand()
        {
            var command = new SubmitCode("123");

            command.GetToken()
            .Should()
            .NotBeNullOrWhiteSpace();
        }
예제 #3
0
        public void Command_tokens_are_reproducible_given_the_same_seed()
        {
            var command1 = new SubmitCode("123");

            command1.SetToken("the-token");
            string token1 = command1.GetToken();

            var command2 = new SubmitCode("123");

            command2.SetToken("the-token");
            string token2 = command2.GetToken();

            token2.Should().Be(token1);
        }