예제 #1
0
 public bool Equals(Campaign other, bool campareBetweenEditPanelAndGridView)
 {
     if (other == null)
     {
         return false;
     }
     if (!string.Equals(this.Name, other.Name, StringComparison.OrdinalIgnoreCase))
     {
         return false;
     }
     if (!string.Equals(this.Status, other.Status, StringComparison.OrdinalIgnoreCase))
     {
         return false;
     }
     if (!string.Equals(this.BudgetType, other.BudgetType, StringComparison.OrdinalIgnoreCase))
     {
         return false;
     }
     if (!string.Equals(this.DailyBudget, other.DailyBudget, StringComparison.OrdinalIgnoreCase))
     {
         return false;
     }
     if (!string.Equals(this.MonthlyBudget, other.MonthlyBudget, StringComparison.OrdinalIgnoreCase))
     {
         return false;
     }
     if (!campareBetweenEditPanelAndGridView)
     {
         if (!Performance.Equals(other.Performance))
         {
             return false;
         }
     }
     return true;
 }
예제 #2
0
        public static Campaign Parse(WinRow row)
        {
            if (row.Cells.Count != 16)
            {
                throw new Exception("The count of cell in campaign grid should be equal to 16!");
            }

            Campaign campaign = new Campaign
            {
                Name = GridViewUtilities.GetValueProperty(row.Cells[2]),
                Status = GridViewUtilities.GetValueProperty(row.Cells[3]),
                BudgetType = GridViewUtilities.GetValueProperty(row.Cells[4]),
                DailyBudget = GridViewUtilities.GetValueProperty(row.Cells[5]),
                MonthlyBudget = GridViewUtilities.GetValueProperty(row.Cells[6]),
                Performance = Performance.Parse(row, 7),
            };
            return campaign;
        }
예제 #3
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();
 }