Ejemplo n.º 1
0
        public void VertifyFail(string code, string validCode, int lastestAttempt, VerifyConfig verifyConfig, VertifyResponse expected)
        {
            this.otp.Setup(x => x.GetOTP()).Returns(validCode);
            this.counter.Setup(x => x.GetVertify()).Returns(lastestAttempt);
            this.dac.Setup(x => x.GetVerifyConfig()).Returns(verifyConfig);

            BackOffController backOffCtr = new BackOffController(counter.Object, dac.Object, time.Object, otp.Object);
            var result = backOffCtr.Vertify(code);

            result.Should().BeEquivalentTo(expected);
        }