public void TestEventFeeWithDiscountCodeAccessCode() { evt = new Event("TestEventFeeWithDiscountCodeAccessCode"); paymentMethod = new PaymentMethod(FormData.PaymentMethod.Check); evt.CheckoutPage.PaymentMethods.Add(paymentMethod); EventFee ef = new EventFee(); ef.StandardPrice = 100; CustomFieldCode dc1 = new CustomFieldCode("dc1"); dc1.Amount = 10; dc1.CodeDirection = FormData.ChangePriceDirection.Decrease; dc1.CodeKind = FormData.ChangeType.FixedAmount; dc1.CodeType = FormData.CustomFieldCodeType.DiscountCode; CustomFieldCode ac1 = new CustomFieldCode("ac1"); ac1.CodeType = FormData.CustomFieldCodeType.AccessCode; ef.AllCustomCodes.Add(dc1); ef.AllCustomCodes.Add(ac1); evt.StartPage.Event_Fee = ef; KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, evt); Registrant reg1 = new Registrant(evt); reg1.Payment_Method = paymentMethod; reg1.EventFee_Response = new EventFeeResponse(); reg1.EventFee_Response.Code = dc1; KeywordProvider.RegistrationCreation.CreateRegistration(reg1); Assert.True(KeywordProvider.RegisterDefault.GetTotal(FormData.RegisterPage.Confirmation) == 90); Registrant reg2 = new Registrant(evt); reg2.Payment_Method = paymentMethod; reg2.EventFee_Response = new EventFeeResponse(); reg2.EventFee_Response.Code = ac1; KeywordProvider.RegistrationCreation.CreateRegistration(reg2); Assert.True(KeywordProvider.RegisterDefault.GetTotal(FormData.RegisterPage.Confirmation) == 100); }
public void GroupEventFeeGroupDiscount() { Event groupEventFeeGroupDiscount = new Event("RI-GroupEventFeeGroupDiscount"); GroupDiscount groupDiscount = new GroupDiscount(); groupDiscount.GroupSize = 2; groupDiscount.GroupSizeOption = GroupDiscount_GroupSizeOption.SizeOrMore; groupDiscount.DiscountAmount = 1; groupDiscount.GroupDiscountType = GroupDiscount_DiscountType.USDollar; groupDiscount.AddtionalRegOption = GroupDiscount_AdditionalRegOption.AnyAdditional; groupEventFeeGroupDiscount.StartPage.GroupDiscount = groupDiscount; RegType regType = new RegType("First"); regType.Price = 50; groupEventFeeGroupDiscount.StartPage.RegTypes.Add(regType); PaymentMethod paymentMethod = new PaymentMethod(FormData.PaymentMethod.Check); groupEventFeeGroupDiscount.CheckoutPage.PaymentMethods.Add(paymentMethod); KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, groupEventFeeGroupDiscount); Registrant reg1 = new Registrant(groupEventFeeGroupDiscount); reg1.EventFee_Response = new EventFeeResponse(groupEventFeeGroupDiscount.StartPage.RegTypes[0]); reg1.Payment_Method = paymentMethod; Registrant reg2 = new Registrant(groupEventFeeGroupDiscount); reg1.EventFee_Response = new EventFeeResponse(groupEventFeeGroupDiscount.StartPage.RegTypes[0]); Group group = new Group(); group.Primary = reg1; group.Secondaries.Add(reg2); KeywordProvider.RegistrationCreation.GroupRegistration(group); }
public void AddPaymentMethods(PaymentMethod method) { PageObject.PageObjectProvider.Builder.EventDetails.FormPages.CheckoutPage.AddPaymentMethod_Click(); PageObject.PageObjectProvider.Builder.EventDetails.FormPages.CheckoutPage.PaymentMethodSelections.SelectByName(); PageObject.PageObjectProvider.Builder.EventDetails.FormPages.CheckoutPage.PaymentMethodSelections.PaymentMethods.SelectWithText(CustomStringAttribute.GetCustomString(method.PMethod)); PageObject.PageObjectProvider.Builder.EventDetails.FormPages.CheckoutPage.PaymentMethodSelections.SaveAndClose_Click(); }
public void TestAccessCode() { evt = new Event("AccessCodeFixture"); paymentMethod = new PaymentMethod(FormData.PaymentMethod.Check); evt.CheckoutPage.PaymentMethods.Add(paymentMethod); regType = new RegType("RegType"); regType.Price = 50; CustomFieldCode ac1 = new CustomFieldCode("ac1"); ac1.CodeType = FormData.CustomFieldCodeType.AccessCode; ac1.Limit = 2; regType.AllCustomCodes.Add(ac1); CustomFieldCode ac2 = new CustomFieldCode("ac2"); ac2.CodeType = FormData.CustomFieldCodeType.AccessCode; regType.AllCustomCodes.Add(ac2); evt.StartPage.RegTypes.Add(regType); agenda = new AgendaItem_CheckBox("Agenda"); agenda.Price = 80; CustomFieldCode ac3 = new CustomFieldCode("ac3"); ac3.CodeType = FormData.CustomFieldCodeType.AccessCode; ac3.Limit = 2; CustomFieldCode ac4 = new CustomFieldCode("ac4"); ac4.CodeType = FormData.CustomFieldCodeType.AccessCode; agenda.DiscountCodes.Add(ac3); agenda.DiscountCodes.Add(ac4); agenda.BulkCodes = CustomFieldCode.GenerateBulkCodes(agenda.DiscountCodes); evt.AgendaPage = new AgendaPage(); evt.AgendaPage.AgendaItems.Add(agenda); merch = new MerchandiseItem("Merch"); merch.Type = FormData.MerchandiseType.Fixed; merch.Price = 110; CustomFieldCode ac5 = new CustomFieldCode("ac5"); ac5.CodeType = FormData.CustomFieldCodeType.AccessCode; merch.DiscountCodes.Add(ac5); evt.MerchandisePage = new MerchandisePage(); evt.MerchandisePage.Merchandises.Add(merch); KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, evt, false, true); Registrant reg1 = this.GenerateReg(ac1, ac3, ac5); KeywordProvider.RegistrationCreation.CreateRegistration(reg1); Assert.True(KeywordProvider.RegisterDefault.GetTotal(FormData.RegisterPage.Confirmation) == 240); Registrant reg2 = this.GenerateReg(ac1, ac3, ac5); KeywordProvider.RegistrationCreation.CreateRegistration(reg2); Assert.True(KeywordProvider.RegisterDefault.GetTotal(FormData.RegisterPage.Confirmation) == 240); Registrant reg3 = this.GenerateReg(ac1, ac4, ac5); KeywordProvider.RegistrationCreation.Checkin(reg3); Assert.True(KeywordProvider.RegisterDefault.HasErrorMessage(string.Format(Messages.RegisterError.RegTypeCodeLimitHasReached, ac1.CodeString))); Registrant reg4 = this.GenerateReg(ac2, ac3, ac5); KeywordProvider.RegistrationCreation.Checkin(reg4); KeywordProvider.RegistrationCreation.PersonalInfo(reg4); KeywordProvider.RegistrationCreation.Agenda(reg4); Assert.True(KeywordProvider.RegisterDefault.HasErrorMessage(Messages.RegisterError.AgendaCodeLimitReached)); Registrant reg5 = this.GenerateReg(ac2, ac4, ac5); KeywordProvider.RegistrationCreation.CreateRegistration(reg5); Assert.True(KeywordProvider.RegisterDefault.GetTotal(FormData.RegisterPage.Confirmation) == 240); }
public void TestRegTypeWithDiscountCodeAccessCode() { evt = new Event("TestRegTypeWithDiscountCodeAccessCode"); paymentMethod = new PaymentMethod(FormData.PaymentMethod.Check); evt.CheckoutPage.PaymentMethods.Add(paymentMethod); //regtype1 no price RegType regType1 = new RegType("RegType1"); //regtype2 has price, no code RegType regType2 = new RegType("RegType2"); regType2.Price = 10; //regtype2 has price, has code RegType regType3 = new RegType("RegType3"); regType3.Price = 100; CustomFieldCode dc1 = new CustomFieldCode("dc1"); dc1.Amount = 10; dc1.CodeDirection = FormData.ChangePriceDirection.Decrease; dc1.CodeKind = FormData.ChangeType.FixedAmount; dc1.CodeType = FormData.CustomFieldCodeType.DiscountCode; CustomFieldCode ac1 = new CustomFieldCode("ac1"); ac1.CodeType = FormData.CustomFieldCodeType.AccessCode; regType3.AllCustomCodes.Add(dc1); regType3.AllCustomCodes.Add(ac1); evt.StartPage.RegTypes.Add(regType1); evt.StartPage.RegTypes.Add(regType2); evt.StartPage.RegTypes.Add(regType3); KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, evt); Registrant reg1 = new Registrant(evt); reg1.Payment_Method = paymentMethod; reg1.EventFee_Response = new EventFeeResponse(regType1); KeywordProvider.RegistrationCreation.CreateRegistration(reg1); Assert.False(PageObject.PageObjectProvider.Register.RegistationSite.Confirmation.Total.IsPresent); Registrant reg2 = new Registrant(evt); reg2.Payment_Method = paymentMethod; reg2.EventFee_Response = new EventFeeResponse(regType2); KeywordProvider.RegistrationCreation.CreateRegistration(reg2); Assert.True(KeywordProvider.RegisterDefault.GetTotal(FormData.RegisterPage.Confirmation) == 10); Registrant reg3 = new Registrant(evt); reg3.Payment_Method = paymentMethod; reg3.EventFee_Response = new EventFeeResponse(regType3); reg3.EventFee_Response.Code = dc1; KeywordProvider.RegistrationCreation.CreateRegistration(reg3); Assert.True(KeywordProvider.RegisterDefault.GetTotal(FormData.RegisterPage.Confirmation) == 90); Registrant reg4 = new Registrant(evt); reg4.Payment_Method = paymentMethod; reg4.EventFee_Response = new EventFeeResponse(regType3); reg4.EventFee_Response.Code = ac1; KeywordProvider.RegistrationCreation.CreateRegistration(reg4); Assert.True(KeywordProvider.RegisterDefault.GetTotal(FormData.RegisterPage.Confirmation) == 100); }
public void EventFeeEaylyPrice_Registrants() { Event eventFeeEaylyPrice_Registrants = new Event("RI-EventFeeEaylyPrice-Registrants"); RegType regType = new RegType("First"); EarlyPrice earlyPrice = new EarlyPrice(); earlyPrice.earlyPrice = 40; earlyPrice.EarlyPriceType = FormData.EarlyPriceType.Registrants; earlyPrice.FirstNRegistrants = 1; regType.EarlyPrice = earlyPrice; regType.Price = 50; eventFeeEaylyPrice_Registrants.StartPage.RegTypes.Add(regType); PaymentMethod paymentMethod = new PaymentMethod(FormData.PaymentMethod.Check); eventFeeEaylyPrice_Registrants.CheckoutPage.PaymentMethods.Add(paymentMethod); KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, eventFeeEaylyPrice_Registrants); Registrant registrant = new Registrant(eventFeeEaylyPrice_Registrants); registrant.EventFee_Response = new EventFeeResponse(eventFeeEaylyPrice_Registrants.StartPage.RegTypes[0]); registrant.Payment_Method = paymentMethod; KeywordProvider.RegistrationCreation.Checkin(registrant); KeywordProvider.RegistrationCreation.PersonalInfo(registrant); Assert.True(KeywordProvider.RegisterDefault.GetTotal(DataCollection.FormData.RegisterPage.Confirmation) == earlyPrice.earlyPrice); KeywordProvider.RegistrationCreation.Checkout(registrant); Registrant registrant1 = new Registrant(eventFeeEaylyPrice_Registrants); registrant1.EventFee_Response = new EventFeeResponse(eventFeeEaylyPrice_Registrants.StartPage.RegTypes[0]); registrant1.Payment_Method = paymentMethod; KeywordProvider.RegistrationCreation.Checkin(registrant1); KeywordProvider.RegistrationCreation.PersonalInfo(registrant1); Assert.True(KeywordProvider.RegisterDefault.GetTotal(DataCollection.FormData.RegisterPage.Confirmation) == regType.Price.Value); KeywordProvider.RegistrationCreation.Checkout(registrant1); }
private void GenerateEventForTaxRate(bool applyTaxOne, bool applyTaxTwo, FormData.Countries? country) { this.evt = new Event("TaxFixture"); this.regType = new RegType("regType"); this.paymentMethod = new PaymentMethod(FormData.PaymentMethod.Check); TaxRate tax1 = new TaxRate("tax1"); if (country.HasValue) { tax1.Country = country.Value; } tax1.Rate = 50; TaxRate tax2 = new TaxRate("tax2"); tax2.Rate = 10; regType.Price = 50; regType.ApplyTaxOne = applyTaxOne; regType.ApplyTaxTwo = applyTaxTwo; evt.TaxRateOne = tax1; evt.TaxRateTwo = tax2; evt.StartPage.RegTypes.Add(regType); evt.CheckoutPage.PaymentMethods.Add(paymentMethod); this.agenda = new AgendaItem_CheckBox("agenda"); agenda.Price = 60; agenda.ApplyTaxOne = applyTaxOne; agenda.ApplyTaxTwo = applyTaxTwo; evt.AgendaPage = new AgendaPage(); evt.AgendaPage.AgendaItems.Add(agenda); this.merch = new MerchandiseItem("merch"); merch.Type = FormData.MerchandiseType.Fixed; merch.Price = 70; merch.ApplyTaxOne = applyTaxOne; merch.ApplyTaxTwo = applyTaxTwo; evt.MerchandisePage = new MerchandisePage(); evt.MerchandisePage.Merchandises.Add(merch); KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, evt); }
public void RegistrationMiddlePriceDate() { Event eventMiddlePrice = new Event("RI-EventMiddlePrice"); RegType regType = new RegType("First"); EarlyPrice earlyPrice = new EarlyPrice(); earlyPrice.earlyPrice = 40; earlyPrice.EarlyPriceType = FormData.EarlyPriceType.DateAndTime; earlyPrice.EarlyPriceDate = System.DateTime.Today.AddDays(-2); earlyPrice.EarlyPriceTime = System.DateTime.Now; LatePrice latePrice = new LatePrice(); latePrice.latePrice = 60; latePrice.LatePriceDate = System.DateTime.Today.AddDays(2); latePrice.LatePriceTime = System.DateTime.Now; regType.EarlyPrice = earlyPrice; regType.LatePrice = latePrice; regType.Price = 50; eventMiddlePrice.StartPage.RegTypes.Add(regType); PaymentMethod paymentMethod = new PaymentMethod(FormData.PaymentMethod.Check); eventMiddlePrice.CheckoutPage.PaymentMethods.Add(paymentMethod); KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, eventMiddlePrice); Registrant registrant = new Registrant(eventMiddlePrice); registrant.EventFee_Response = new EventFeeResponse(eventMiddlePrice.StartPage.RegTypes[0]); registrant.Payment_Method = paymentMethod; KeywordProvider.RegistrationCreation.Checkin(registrant); KeywordProvider.RegistrationCreation.PersonalInfo(registrant); Assert.True(KeywordProvider.RegisterDefault.GetTotal(DataCollection.FormData.RegisterPage.Confirmation) == regType.Price.Value); KeywordProvider.RegistrationCreation.Checkout(registrant); }
public Registrant RegistrationEventFeeCodeRequired(FormData.CustomFieldCodeType type) { Event eventFeeDCRequired = new Event(string.Format("RI-SingleRegistrationEventFee{0}Required", type.ToString())); RegType regType1 = new RegType("First"); RegType regType2 = new RegType("Second"); regType2.Price = 50; CustomFieldCode dc = new CustomFieldCode("CodeName"); dc.CodeType = type; dc.CodeDirection = FormData.ChangePriceDirection.Decrease; dc.Amount = 10; dc.Limit = 1; dc.CodeKind = FormData.ChangeType.FixedAmount; regType2.AllCustomCodes.Add(dc); regType2.RequireDC = true; PaymentMethod paymentMethod = new PaymentMethod(FormData.PaymentMethod.Check); eventFeeDCRequired.StartPage.RegTypes.Add(regType1); eventFeeDCRequired.StartPage.RegTypes.Add(regType2); eventFeeDCRequired.CheckoutPage.PaymentMethods.Add(paymentMethod); KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, eventFeeDCRequired); Registrant registrant = new Registrant(eventFeeDCRequired); registrant.EventFee_Response = new EventFeeResponse(eventFeeDCRequired.StartPage.RegTypes[1]); registrant.EventFee_Response.Code = dc; registrant.Payment_Method = paymentMethod; PageObject.PageObjectProvider.Register.RegistationSite.Checkin.OpenUrl(registrant); PageObject.PageObjectProvider.Register.RegistationSite.Checkin.SelectRegTypeRadioButton(registrant.EventFee_Response.RegType); Assert.True(PageObject.PageObjectProvider.Register.RegistationSite.Checkin.DiscountCodeRequired.IsPresent); KeywordProvider.RegistrationCreation.CreateRegistration(registrant); return registrant; }
public static string GetPaymentMethodCheckouLabel(PaymentMethod value) { string label = null; Type type = value.GetType(); FieldInfo fi = type.GetField(value.ToString()); PaymentMethodCheckouLabelAttribute[] attrs = fi.GetCustomAttributes(typeof(PaymentMethodCheckouLabelAttribute), false) as PaymentMethodCheckouLabelAttribute[]; if (attrs.Length > 0) label = attrs[0].PaymentMethodCheckouLabelValue; return label; }
public void RegTypeWithFee() { Event evt = new Event("RI-RegTypeWithFee"); RegType regType1 = new RegType("EarlyRegistrantsLateDate"); EarlyPrice earlyPrice1 = new EarlyPrice(); earlyPrice1.earlyPrice = 40; earlyPrice1.EarlyPriceType = FormData.EarlyPriceType.Registrants; earlyPrice1.FirstNRegistrants = 1; LatePrice latePrice1 = new LatePrice(); latePrice1.latePrice = 60; latePrice1.LatePriceDate = DateTime.Today.AddDays(2); latePrice1.LatePriceTime = DateTime.Now; regType1.Price = 50; regType1.EarlyPrice = earlyPrice1; regType1.LatePrice = latePrice1; RegType regType2 = new RegType("EarlyLateFeeDCDollar"); EarlyPrice earlyPrice2 = new EarlyPrice(); earlyPrice2.earlyPrice = 40; earlyPrice2.EarlyPriceType = FormData.EarlyPriceType.DateAndTime; earlyPrice2.EarlyPriceDate = DateTime.Today.AddDays(-2); earlyPrice2.EarlyPriceTime = DateTime.Now; LatePrice latePrice2 = new LatePrice(); latePrice2.latePrice = 60; latePrice2.LatePriceDate = DateTime.Today.AddDays(2); latePrice2.LatePriceTime = DateTime.Now; CustomFieldCode discountCode2 = new CustomFieldCode("code2"); discountCode2.Amount = 5; discountCode2.CodeDirection = FormData.ChangePriceDirection.Decrease; discountCode2.CodeKind = FormData.ChangeType.FixedAmount; discountCode2.CodeType = FormData.CustomFieldCodeType.DiscountCode; regType2.Price = 50; regType2.EarlyPrice = earlyPrice2; regType2.LatePrice = latePrice2; regType2.AllCustomCodes.Add(discountCode2); RegType regType3 = new RegType("EarlyLateFeeDCPercent"); EarlyPrice earlyPrice3 = new EarlyPrice(); earlyPrice3.earlyPrice = 40; earlyPrice3.EarlyPriceType = FormData.EarlyPriceType.DateAndTime; earlyPrice3.EarlyPriceDate = DateTime.Today.AddDays(-2); earlyPrice3.EarlyPriceTime = DateTime.Now; LatePrice latePrice3 = new LatePrice(); latePrice3.latePrice = 60; latePrice3.LatePriceDate = DateTime.Today.AddDays(2); latePrice3.LatePriceTime = DateTime.Now; CustomFieldCode discountCode3 = new CustomFieldCode("code3"); discountCode3.Amount = 10; discountCode3.CodeDirection = FormData.ChangePriceDirection.Decrease; discountCode3.CodeKind = FormData.ChangeType.Percent; discountCode3.CodeType = FormData.CustomFieldCodeType.DiscountCode; regType3.Price = 50; regType3.EarlyPrice = earlyPrice3; regType3.LatePrice = latePrice3; regType3.AllCustomCodes.Add(discountCode3); RegType regType4 = new RegType("EarlyLateFeeDCPositiveDollar"); EarlyPrice earlyPrice4 = new EarlyPrice(); earlyPrice4.earlyPrice = 40; earlyPrice4.EarlyPriceType = FormData.EarlyPriceType.DateAndTime; earlyPrice4.EarlyPriceDate = DateTime.Today.AddDays(-2); earlyPrice4.EarlyPriceTime = DateTime.Now; LatePrice latePrice4 = new LatePrice(); latePrice4.latePrice = 60; latePrice4.LatePriceDate = DateTime.Today.AddDays(2); latePrice4.LatePriceTime = DateTime.Now; CustomFieldCode discountCode4 = new CustomFieldCode("code4"); discountCode4.Amount = -5; discountCode4.CodeDirection = FormData.ChangePriceDirection.Decrease; discountCode4.CodeKind = FormData.ChangeType.FixedAmount; discountCode4.CodeType = FormData.CustomFieldCodeType.DiscountCode; regType4.Price = 50; regType4.EarlyPrice = earlyPrice4; regType4.LatePrice = latePrice4; regType4.AllCustomCodes.Add(discountCode4); RegType regType5 = new RegType("EarlyLateFeeDCRequired"); EarlyPrice earlyPrice5 = new EarlyPrice(); earlyPrice5.earlyPrice = 40; earlyPrice5.EarlyPriceType = FormData.EarlyPriceType.DateAndTime; earlyPrice5.EarlyPriceDate = DateTime.Today.AddDays(-2); earlyPrice5.EarlyPriceTime = DateTime.Now; LatePrice latePrice5 = new LatePrice(); latePrice5.latePrice = 60; latePrice5.LatePriceDate = DateTime.Today.AddDays(2); latePrice5.LatePriceTime = DateTime.Now; CustomFieldCode discountCode5 = new CustomFieldCode("code5"); discountCode5.Amount = 5; discountCode5.CodeDirection = FormData.ChangePriceDirection.Decrease; discountCode5.CodeKind = FormData.ChangeType.FixedAmount; discountCode5.CodeType = FormData.CustomFieldCodeType.DiscountCode; regType5.Price = 50; regType5.EarlyPrice = earlyPrice5; regType5.LatePrice = latePrice5; regType5.AllCustomCodes.Add(discountCode5); regType5.RequireDC = true; RegType regType6 = new RegType("EarlyLateFeeAC"); EarlyPrice earlyPrice6 = new EarlyPrice(); earlyPrice6.earlyPrice = 40; earlyPrice6.EarlyPriceType = FormData.EarlyPriceType.DateAndTime; earlyPrice6.EarlyPriceDate = DateTime.Today.AddDays(-2); earlyPrice6.EarlyPriceTime = DateTime.Now; LatePrice latePrice6 = new LatePrice(); latePrice6.latePrice = 60; latePrice6.LatePriceDate = DateTime.Today.AddDays(2); latePrice6.LatePriceTime = DateTime.Now; CustomFieldCode discountCode6 = new CustomFieldCode("code6"); discountCode6.CodeType = FormData.CustomFieldCodeType.AccessCode; regType6.Price = 50; regType6.EarlyPrice = earlyPrice6; regType6.LatePrice = latePrice6; regType6.AllCustomCodes.Add(discountCode6); EarlyPrice earlyPrice7 = new EarlyPrice(); earlyPrice7.earlyPrice = 40; earlyPrice7.EarlyPriceType = FormData.EarlyPriceType.DateAndTime; earlyPrice7.EarlyPriceDate = DateTime.Today.AddDays(-2); earlyPrice7.EarlyPriceTime = DateTime.Now; LatePrice latePrice7 = new LatePrice(); latePrice7.latePrice = 60; latePrice7.LatePriceDate = DateTime.Today.AddDays(2); latePrice7.LatePriceTime = DateTime.Now; CustomFieldCode discountCode7 = new CustomFieldCode("code7"); discountCode7.Amount = 5; discountCode7.CodeDirection = FormData.ChangePriceDirection.Decrease; discountCode7.CodeKind = FormData.ChangeType.FixedAmount; discountCode7.CodeType = FormData.CustomFieldCodeType.DiscountCode; PaymentMethod paymentMethod = new PaymentMethod(FormData.PaymentMethod.Check); evt.StartPage.RegTypes.Add(regType1); evt.StartPage.RegTypes.Add(regType2); evt.StartPage.RegTypes.Add(regType3); evt.StartPage.RegTypes.Add(regType4); evt.StartPage.RegTypes.Add(regType5); evt.StartPage.RegTypes.Add(regType6); evt.CheckoutPage.PaymentMethods.Add(paymentMethod); KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, evt); Registrant reg1 = new Registrant(evt); reg1.EventFee_Response = new EventFeeResponse(regType1); reg1.Payment_Method = paymentMethod; KeywordProvider.RegistrationCreation.CreateRegistration(reg1); Assert.True(reg1.EventFee_Response.RegType.EarlyPrice.earlyPrice.Equals(KeywordProvider.RegisterDefault.GetTotal(DataCollection.FormData.RegisterPage.Confirmation))); Registrant reg2 = new Registrant(evt); reg2.EventFee_Response = new EventFeeResponse(regType1); reg2.Payment_Method = paymentMethod; KeywordProvider.RegistrationCreation.CreateRegistration(reg2); Assert.True(reg2.EventFee_Response.RegType.Price.Value.Equals(KeywordProvider.RegisterDefault.GetTotal(DataCollection.FormData.RegisterPage.Confirmation))); PageObject.PageObjectProvider.Register.RegistationSite.Checkin.OpenUrl(reg2); PageObject.PageObjectProvider.Register.RegistationSite.Login.StartNewRegistration_Click(); PageObject.PageObjectProvider.Register.RegistationSite.Checkin.SelectRegTypeRadioButton(regType2); Assert.True(PageObject.PageObjectProvider.Register.RegistationSite.Checkin.EventFeeDiscountCode.IsPresent); PageObject.PageObjectProvider.Register.RegistationSite.Checkin.SelectRegTypeRadioButton(regType3); Assert.True(PageObject.PageObjectProvider.Register.RegistationSite.Checkin.EventFeeDiscountCode.IsPresent); PageObject.PageObjectProvider.Register.RegistationSite.Checkin.SelectRegTypeRadioButton(regType4); Assert.True(PageObject.PageObjectProvider.Register.RegistationSite.Checkin.EventFeeDiscountCode.IsPresent); PageObject.PageObjectProvider.Register.RegistationSite.Checkin.SelectRegTypeRadioButton(regType5); Assert.True(PageObject.PageObjectProvider.Register.RegistationSite.Checkin.EventFeeDiscountCode.IsPresent); Assert.True(PageObject.PageObjectProvider.Register.RegistationSite.Checkin.DiscountCodeRequired.IsPresent); PageObject.PageObjectProvider.Register.RegistationSite.Checkin.SelectRegTypeRadioButton(regType6); Assert.True(PageObject.PageObjectProvider.Register.RegistationSite.Checkin.EventFeeDiscountCode.IsPresent); }