Ejemplo n.º 1
0
        public void PutOtp_Should_StoreOtpsAndReturnNotNullToken_When_NotNullOtpVerificationTokenPassed()
        {
            //Arrange
            var otpStorage = new InMemoryOtpStorage();

            var token = otpStorage.PutOtp("12345");

            Assert.IsNotNull(token);
        }
Ejemplo n.º 2
0
        public void PutOtpAndGetOtp_Should_StoreAndReturnCorrectOtp_When_NotNullOtpPassed()
        {
            //Arrange
            var otpStorage = new InMemoryOtpStorage();

            var otp   = "12345";
            var token = otpStorage.PutOtp(otp);

            var otpUnderTest = otpStorage.GetOtp(token);

            Assert.AreEqual(otpUnderTest, otp);
        }
Ejemplo n.º 3
0
 public void PutOtp_Should_ThrowArgumentException_When_WhiteSpaceOtpPassed()
 {
     //Arrange
     var otpStorage = new InMemoryOtpStorage();
     var token      = otpStorage.PutOtp("   ");
 }
Ejemplo n.º 4
0
 public void PutOtp_Should_ThrowArgumentException_When_EmptyOtpPassed()
 {
     //Arrange
     var otpStorage = new InMemoryOtpStorage();
     var token      = otpStorage.PutOtp(string.Empty);
 }