예제 #1
0
        //Not adding all input tests due to time constraint and jumping to Transaction tests
        private Card CreateValidCard()
        {
            CardBuilder cardBuilder = new CardBuilder()
                                      .WithName(validName)
                                      .WithNumber(CardNumberProvider.GetNewCardNumber())
                                      .WithCvv(CardNumberProvider.GetNewCvv())
                                      .WithPin(validPin)
                                      .WithExpiry(DateTime.Now.AddDays(2));

            return(cardBuilder.Build());
        }
예제 #2
0
        public void Given_InputSuppliedByRandomise_BuilderShould_AbleToCreateCardSuccessfuly()
        {
            CardBuilder cardBuilder = new CardBuilder()
                                      .WithName(validName)
                                      .WithNumber(CardNumberProvider.GetNewCardNumber())
                                      .WithCvv(CardNumberProvider.GetNewCvv())
                                      .WithPin(CardNumberProvider.GetNewPin())
                                      .WithExpiry(DateTime.Now.AddDays(2));

            Assert.DoesNotThrow(() => cardBuilder.Build());
        }