//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()); }
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()); }