Exemplo n.º 1
0
        public void CompareCardTrueTest()
        {
            var validationInfo = new ValidationInfo
            {
                Token            = 25015345051234201,
                CVV              = 150,
                RegistrationDate = Convert.ToDateTime("2019-08-25T01:59:05.4686297Z")
            };

            var cardList = new List <CardData>();

            cardList.Add(_cardData);

            cardRepository.Setup(r => r.GetCard(Convert.ToDateTime("2019-08-25T01:59:05.4686297Z"))).Returns(cardList);
            tokenService.Setup(m => m.GenerateToken(It.IsAny <CardData>())).Returns(Task.FromResult(25015345051234201));

            var ret = cardService.CompareCard(validationInfo).Result;

            Assert.AreEqual(true, ret);
        }