Пример #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.DailyBudget, other.DailyBudget, StringComparison.OrdinalIgnoreCase))
     {
         return false;
     }
     if (!string.Equals(this.StartDate, other.StartDate, StringComparison.OrdinalIgnoreCase))
     {
         return false;
     }
     if (!string.Equals(this.EndDate, other.EndDate, StringComparison.OrdinalIgnoreCase))
     {
         return false;
     }
     if (!string.Equals(this.SearchNetwork, other.SearchNetwork, StringComparison.OrdinalIgnoreCase))
     {
         return false;
     }
     if (!string.Equals(this.DisplayNetwork, other.DisplayNetwork, StringComparison.OrdinalIgnoreCase))
     {
         return false;
     }
     if (!campareBetweenEditPanelAndGridView)
     {
         if (!string.Equals(this.ServingStatus, other.ServingStatus, StringComparison.OrdinalIgnoreCase))
         {
             return false;
         }
         if (!string.Equals(this.BudgetOptimizer, other.BudgetOptimizer, StringComparison.OrdinalIgnoreCase))
         {
             return false;
         }
         if (!Performance.Equals(other.Performance))
         {
             return false;
         }
     }
     return true;
 }
Пример #2
0
 public override void OnTestInitialize()
 {
     base.OnTestInitialize();
     CampaignBVT.OnTestInitialize();
     campaign = TestHelper.AddCampaignForInit(this.RandomData);
     UIMaps.MainWindowClasses.MainWindow mainWindow = Get<UIMaps.MainWindowClasses.MainWindow>();
     mainWindow.ExpandGoogleAccountTreeView();
 }
Пример #3
0
        public static Campaign Parse(WinRow row)
        {
            if (row.Cells.Count != 21)
            {
                throw new Exception("The count of cell in campaign grid should be equal to 21!");
            }

            Campaign campaign = new Campaign
            {
                Name = GridViewUtilities.GetValueProperty(row.Cells[2]),
                ServingStatus = GridViewUtilities.GetValueProperty(row.Cells[3]),
                Status = GridViewUtilities.GetValueProperty(row.Cells[4]),
                DailyBudget = GridViewUtilities.GetValueProperty(row.Cells[5]),
                StartDate = GridViewUtilities.GetValueProperty(row.Cells[6]),
                EndDate = GridViewUtilities.GetValueProperty(row.Cells[7]),
                SearchNetwork = GridViewUtilities.GetValueProperty(row.Cells[8]),
                DisplayNetwork = GridViewUtilities.GetValueProperty(row.Cells[9]),
                BudgetOptimizer = GridViewUtilities.GetValueProperty(row.Cells[10]),
                Performance = Performance.Parse(row, 11, true),
            };
            return campaign;
        }