Esempio n. 1
0
        public static CheckOutFormModel BuildCheckOutDetails(CardType cardType)
        {
            var fullname = Faker.Name.FullName();
            var model    = new CheckOutFormModel();

            {
                Email = Faker.Internet.Email(fullname), Name = fullname, Address = Faker.Address.City(), CardType = EnumHelper.GetEnumDescription(cardType), CardNumber = Faker.RandomNumber.Next(10000000, 99999999).ToString() + Faker.RandomNumber.Next(1000000, 99999999), CardholderName = Faker.Name.FullName(), VerificationCode = Faker.RandomNumber.Next(100, 999),
            };
            return(model);
        }
Esempio n. 2
0
 public void FillCheckoutFormAndSubmit(CheckOutFormModel model)
 {
     EmailInput.SendKeysWithWait(model.Email);
     NameInput.SendKeysWithWait(model.Name);
     AddressInput.SendKeysWithWait(model.Address);
     CardTypeDropdown.SelectText(model.CardType);
     CardNumberInput.SendKeysWithWait(model.CardNumber.ToString());
     CardholderNameInput.SendKeysWithWait(model.CardholderName);
     VerificationCodeInput.SendKeysWithWait(model.VerificationCode.ToString());
     PlaceOrder.ClickWithWait();
 }
        public static CheckOutFormModel BuildCheckOutDetails(string cardType)
        {
            string CardsType = cardTypes(cardType);
            var    model     = new CheckOutFormModel()
            {
                Email            = "*****@*****.**",
                Name             = "Test name",
                Address          = "Never Land",
                CardsType        = CardsType,
                CardNumber       = "4111111111111111",
                CardholderName   = "John Smith",
                VerificationCode = "000"
            };

            return(model);
        }