Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the Lynda.Test.ConsumerPages.BillingInformation class.
        /// </summary>
        /// <param name="defaultInfo">Specifies how to initalize the billing information.</param>
        public BillingInformation(DefaultInfo defaultInfo) :
            this()
        {
            if (defaultInfo < DefaultInfo.Standard || defaultInfo > DefaultInfo.Standard)
            {
                throw new ArgumentOutOfRangeException("defaultInfo", defaultInfo,
                                                      "Must be one of the following: Standard");
            }
            switch (defaultInfo)
            {
            case DefaultInfo.Standard:
            {
                FirstName    = "TESTfirstname";
                LastName     = "test";
                Company      = "lynda.com";
                Address      = "6410 via real";
                Apt          = null;
                City         = "Carpinteria";
                State        = "California";
                Zip          = "93013";
                Country      = "United States";
                Phone        = "5555555555";
                BillingEmail = null;
                HowHear      = "Other";
                break;
            }

            default:
                throw new Exception(String.Format("Code not implemented yet: {0}", defaultInfo.ToString()));
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the Lynda.Test.ConsumerPages.PaymentInformation class.
        /// </summary>
        /// <param name="defaultInfo">Specifies how to initialize the payment information.</param>
        public PaymentInformation(DefaultInfo defaultInfo) :
            this()
        {
            if (defaultInfo < DefaultInfo.Standard || defaultInfo > DefaultInfo.Standard)
            {
                throw new ArgumentOutOfRangeException("defaultInfo", defaultInfo,
                                                      "Must be one of the following: Standard");
            }

            switch (defaultInfo)
            {
            case DefaultInfo.Standard:
            {
                PaymentType        = "credit card";
                CreditCardType     = "Visa";
                CreditCardNumber   = "4111111111111111";
                NameOnCard         = "Sue Axelband";
                CreditCardSecurity = "411";
                ExpirationMonth    = "08 - August";
                ExpirationYear     = "2012";
                break;
            }

            default:
                throw new Exception(String.Format("Code not implemented yet: {0}", defaultInfo.ToString()));
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the Lynda.Test.ConsumerPages.PaymentInformation class.
        /// </summary>
        /// <param name="defaultInfo">Specifies how to initialize the payment information.</param>
        public PaymentInformation(DefaultInfo defaultInfo)
            : this()
        {
            if (defaultInfo<DefaultInfo.Standard || defaultInfo>DefaultInfo.Standard)
            {
                throw new ArgumentOutOfRangeException("defaultInfo", defaultInfo,
                      "Must be one of the following: Standard");
            }

            switch (defaultInfo)
            {
                case DefaultInfo.Standard:
                    {
                        PaymentType="credit card";
                        CreditCardType="Visa";
                        CreditCardNumber="4111111111111111";
                        NameOnCard="Sue Axelband";
                        CreditCardSecurity="411";
                        ExpirationMonth="08 - August";
                        ExpirationYear="2012";
                        break;
                    }
                default:
                    throw new Exception(String.Format("Code not implemented yet: {0}", defaultInfo.ToString()));
            }
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the Lynda.Test.ConsumerPages.BillingInformation class.
 /// </summary>
 /// <param name="defaultInfo">Specifies how to initalize the billing information.</param>
 public BillingInformation(DefaultInfo defaultInfo)
     : this()
 {
     if (defaultInfo < DefaultInfo.Standard || defaultInfo > DefaultInfo.Standard)
     {
         throw new ArgumentOutOfRangeException("defaultInfo", defaultInfo,
               "Must be one of the following: Standard");
     }
     switch (defaultInfo)
     {
         case DefaultInfo.Standard:
             {
                 FirstName="TESTfirstname";
                 LastName="test";
                 Company="lynda.com";
                 Address="6410 via real";
                 Apt=null;
                 City="Carpinteria";
                 State="California";
                 Zip="93013";
                 Country="United States";
                 Phone="5555555555";
                 BillingEmail=null;
                 HowHear="Other";
                 break;
             }
         default:
             throw new Exception(String.Format("Code not implemented yet: {0}", defaultInfo.ToString()));
     }
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Initializes a new instance of the Lynda.Test.ConsumerPages.AccountInfo class.
        /// </summary>
        /// <param name="defaultInfo">Specifies how to initalize the account information.</param>
        public AccountInfo(DefaultInfo defaultInfo) :
            this()
        {
            if (defaultInfo < DefaultInfo.Standard || defaultInfo > DefaultInfo.Standard)
            {
                throw new ArgumentOutOfRangeException("defaultInfo", defaultInfo,
                                                      "Must be one of the following: Standard");
            }
            switch (defaultInfo)
            {
            case DefaultInfo.Standard:
            {
                //Form fields
                FirstName = "TESTfirstname";
                LastName  = "test";
                System.DateTime currentDateTime = System.DateTime.Now;
                //short date from current DateTime e.g. "2/20/2012". Uses current culture e.g. mm/dd/yyyy
                string shortDate = currentDateTime.ToShortDateString();
                //Format for use as valid e-mail address e.g. 2-20-2012
                shortDate = shortDate.Replace('/', '-');
                //Fraction of the day that has elapsed since midnight
                TimeSpan timeSinceMidnight = currentDateTime.TimeOfDay;
                //Seconds since midnight e.g. 47003.9293606
                double secondsSinceMidnight = timeSinceMidnight.TotalSeconds;
                //Format lyndaqa-"shortDate"-"secondsSinceMidnight" to no decimal places.
                //e.g. lyndaqa-2-20-2012-47004
                Username        = String.Format("lyndaqa-{0}-{1:0.}", shortDate, secondsSinceMidnight);
                Email           = String.Format("{0}@mailinator.com", username);
                Password        = "******";
                PasswordConfirm = password;

                //No sign ups
                SignMeUpNewReleases = false;
                SignMeUpNewsletters = false;
                SignMeUpSpecial     = false;

                break;
            }

            default:
                throw new Exception(String.Format("Code not implemented yet: {0}", defaultInfo.ToString()));
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Initializes a new instance of the Lynda.Test.ConsumerPages.AccountInfo class.
        /// </summary>
        /// <param name="defaultInfo">Specifies how to initalize the account information.</param>
        public AccountInfo(DefaultInfo defaultInfo)
            : this()
        {
            if (defaultInfo < DefaultInfo.Standard || defaultInfo > DefaultInfo.Standard)
            {
                throw new ArgumentOutOfRangeException("defaultInfo", defaultInfo,
                      "Must be one of the following: Standard");

            }
            switch (defaultInfo)
            {
                case DefaultInfo.Standard:
                    {
                        //Form fields
                        FirstName="TESTfirstname";
                        LastName="test";
                        System.DateTime currentDateTime = System.DateTime.Now;
                        //short date from current DateTime e.g. "2/20/2012". Uses current culture e.g. mm/dd/yyyy
                        string shortDate = currentDateTime.ToShortDateString();
                        //Format for use as valid e-mail address e.g. 2-20-2012
                        shortDate = shortDate.Replace('/', '-');
                        //Fraction of the day that has elapsed since midnight
                        TimeSpan timeSinceMidnight = currentDateTime.TimeOfDay;
                        //Seconds since midnight e.g. 47003.9293606
                        double secondsSinceMidnight = timeSinceMidnight.TotalSeconds;
                        //Format lyndaqa-"shortDate"-"secondsSinceMidnight" to no decimal places.
                        //e.g. lyndaqa-2-20-2012-47004
                        Username = String.Format("lyndaqa-{0}-{1:0.}", shortDate, secondsSinceMidnight);
                        Email = String.Format("{0}@mailinator.com", username);
                        Password = "******";
                        PasswordConfirm = password;

                        //No sign ups
                        SignMeUpNewReleases=false;
                        SignMeUpNewsletters=false;
                        SignMeUpSpecial=false;

                        break;
                    }
                default:
                    throw new Exception(String.Format("Code not implemented yet: {0}", defaultInfo.ToString()));
            }
        }