Ejemplo n.º 1
0
 public static TextAdvertisement NextTextAd(RandomData random)
 {
     TextAdvertisement textAd = new TextAdvertisement
     {
         Title = random.NextEnglishWordsLowercase(5, 4),
         Text = random.NextEnglishWordsLowercase(5, 10),
         DisplayUrl = "www." + random.NextEnglishWordLowercase(10) + ".com",
         DestinationUrl = "http://www." + random.NextEnglishWordLowercase(10, 15) + ".com",
     };
     return textAd;
 }
Ejemplo n.º 2
0
        public void AddTextAd_AdCenter()
        {
            OrderedTestFirstStep(() =>
                {
                    AdCenter.UITestFramework.UIMaps.TextAdClasses.TextAd textAdUI = Get<UITestFramework.UIMaps.TextAdClasses.TextAd>();
                    textAdUI.ClickAddTextAdButton();

                    AdCenter.UITestFramework.Object.TextAdvertisement textAdObject = AdCenter.UITestFramework.Object.TextAdvertisement.NextTextAd(this.RandomData);
                    TextAdvertisementBVT.textAd = textAdObject;

                    CommonUIMaps.DetailedInfoForUploadClasses.DetailedInfoForUpload uploadWindow = Get<CommonUIMaps.DetailedInfoForUploadClasses.DetailedInfoForUpload>();

                    TestHelper.AddTextAd(textAdObject, uploadWindow.VerifyUploadOneAdCenterTextAd);
                }
            );
        }
Ejemplo n.º 3
0
 public static TextAdvertisement Parse(WinRow row)
 {
     if (row.Cells.Count != 18)
     {
         throw new Exception("The count of cell in text ad grid should be equal to 18!");
     }
     TextAdvertisement textAd = new TextAdvertisement
     {
         CampaignName = GridViewUtilities.GetValueProperty(row.Cells[2]),
         AdGroupName = GridViewUtilities.GetValueProperty(row.Cells[3]),
         Title = GridViewUtilities.GetValueProperty(row.Cells[4]),
         Text = GridViewUtilities.GetValueProperty(row.Cells[5]),
         DisplayUrl = GridViewUtilities.GetValueProperty(row.Cells[6]),
         DestinationUrl = GridViewUtilities.GetValueProperty(row.Cells[7]),
         AdGroupStatus = GridViewUtilities.GetValueProperty(row.Cells[8]),
         Performance = Performance.Parse(row, 9),
     };
     return textAd;
 }
Ejemplo n.º 4
0
 public bool Equals(TextAdvertisement other, bool campareBetweenEditPanelAndGridView)
 {
     if (other == null)
     {
         return false;
     }
     if (!string.Equals(this.Title, other.Title, StringComparison.OrdinalIgnoreCase))
     {
         return false;
     }
     if (!string.Equals(this.Text, other.Text, StringComparison.OrdinalIgnoreCase))
     {
         return false;
     }
     if (!string.Equals(this.DisplayUrl, other.DisplayUrl, StringComparison.OrdinalIgnoreCase))
     {
         return false;
     }
     if (!string.Equals(this.DestinationUrl, other.DestinationUrl, StringComparison.OrdinalIgnoreCase))
     {
         return false;
     }
     if (!string.Equals(this.AdGroupStatus, other.AdGroupStatus, StringComparison.OrdinalIgnoreCase))
     {
         return false;
     }
     if (!campareBetweenEditPanelAndGridView)
     {
         if (!string.Equals(this.CampaignName, other.CampaignName, StringComparison.OrdinalIgnoreCase))
         {
             return false;
         }
         if (!string.Equals(this.AdGroupName, other.AdGroupName, StringComparison.OrdinalIgnoreCase))
         {
             return false;
         }
         if (!Performance.Equals(other.Performance))
         {
             return false;
         }
     }
     return true;
 }
Ejemplo n.º 5
0
 public override void OnTestInitialize()
 {
     base.OnTestInitialize();
     CampaignBVT.OnTestInitialize();
     campaign = TestHelper.AddCampaignForInit(this.RandomData);
     UIMaps.MainWindowClasses.MainWindow mainWindow = Get<UIMaps.MainWindowClasses.MainWindow>();
     mainWindow.ExpandAdCenterAccountTreeView();
     adGroup = TestHelper.AddAdGroupForInit(this.RandomData);
     mainWindow.ExpandAdCenterAccountTreeView();
     textAd = TestHelper.AddTextAdforInit(this.RandomData);
     mainWindow.ExpandAdCenterAccountTreeView();
 }
Ejemplo n.º 6
0
 public void EditTextAd_AdCenter()
 {
     OrderedTestInProgress(() =>
         {
             AdCenter.UITestFramework.UIMaps.TextAdClasses.TextAd textAdUI = Get<UITestFramework.UIMaps.TextAdClasses.TextAd>();
             textAd = AdCenter.UITestFramework.Object.TextAdvertisement.NextTextAd(this.RandomData);
             CommonUIMaps.DetailedInfoForUploadClasses.DetailedInfoForUpload uploadWindow = Get<CommonUIMaps.DetailedInfoForUploadClasses.DetailedInfoForUpload>();
             TestHelper.AddTextAd(textAd, uploadWindow.VerifyUpdateOneTextAdForAdCenter);
             UIMaps.MainWindowClasses.MainWindow mainWindow = Get<UIMaps.MainWindowClasses.MainWindow>();
             mainWindow.ExpandAdCenterAccountTreeView();
         }
     );
 }