Пример #1
0
        public void WhenGeneratingANumericAccessCode_ThatCodeShouldVerifySuccessfully()
        {
            var calculator = new AccessTokenCalculator();
            var code       = calculator.GenerateULongAccessToken();

            calculator.IsValid(code).ShouldBeTrue();
        }
Пример #2
0
        public void WhenGeneratingANumericAccessCode_AndMessingWithTheChecksum_ThatCodeShouldNotVerifySuccessfully()
        {
            var calculator = new AccessTokenCalculator();
            var code       = calculator.GenerateULongAccessToken();

            code++;
            calculator.IsValid(code).ShouldBeFalse();
        }