Package com.google.api.adwords.v201008.cm

Examples of com.google.api.adwords.v201008.cm.AdGroupPage


    operation.setOperator(Operator.SET);

    AdGroupAdOperation[] operations = new AdGroupAdOperation[] {operation};

    // Update ad.
    AdGroupAdReturnValue result = service.mutate(operations);
    AdGroupAd testAdGroupAd = result.getValue()[0];

    assertEquals(adGroupAd.getStatus(), testAdGroupAd.getStatus());
  }
View Full Code Here


    operation.setOperator(Operator.REMOVE);

    AdGroupAdOperation[] operations = new AdGroupAdOperation[] {operation};

    // Remove ad.
    AdGroupAdReturnValue result = service.mutate(operations);
    AdGroupAd testAdGroupAd = result.getValue()[0];

    assertEquals(AdGroupAdStatus.DISABLED, testAdGroupAd.getStatus());
  }
View Full Code Here

  /**
   * Test getting an ad group ad.
   */
  public void testGet() throws Exception {
    // Create ad selector.
    AdGroupAdSelector selector = new AdGroupAdSelector();
    selector.setAdIds(new long[] {adId});

    // Create date range.
    DateRange range = new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today());
    selector.setStatsSelector(new AdStatsSelector(range, null));

    // Get ads with the selector created above.
    AdGroupAdPage page = service.get(selector);

    assertNotNull(page);
View Full Code Here

  /**
   * Test getting all ad group ads in an ad group.
   */
  public void testGetAllInAdGroup() throws Exception {
    // Create ad selector.
    AdGroupAdSelector selector = new AdGroupAdSelector();
    selector.setAdGroupIds(new long[] {adGroupId});

    // Get ads with the selector created above.
    AdGroupAdPage page = service.get(selector);

    assertNotNull(page);
View Full Code Here

  /**
   * Test getting all ad group ads in an ad group.
   */
  public void testGetAllInCampaign() throws Exception {
    // Create ad selector.
    AdGroupAdSelector selector = new AdGroupAdSelector();
    selector.setCampaignIds(new long[] {campaignId});

    // Get ads with the selector created above.
    AdGroupAdPage page = service.get(selector);

    assertNotNull(page);
View Full Code Here

  /**
   * Test getting all ad group ads.
   */
  public void testGetAll() throws Exception {
    // Get ads with a created selector.
    AdGroupAdSelector selector = new AdGroupAdSelector();
    AdGroupAdPage page = service.get(selector);

    assertNotNull(page);
    assertNotNull(page.getEntries());
    assertTrue("Expected at least 1 entry", page.getTotalNumEntries() >= 1);
View Full Code Here

    // Create the DateRange and AdGroupSelector.
    DateRange range = new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today());

    selector.setStatsSelector(new StatsSelector(range, null));

    AdGroupPage page = adGroupService.get(selector);

    assertNotNull(page);
    assertEquals(new Integer(1), page.getTotalNumEntries());
    assertNotNull(page.getEntries(0).getStats());
  }
View Full Code Here

   * Test getting all ad groups in a campaign
   */
  public void testGetAllInCampaign() throws Exception{
    AdGroupSelector selector = new AdGroupSelector ();
    selector.setCampaignIds(new long[] {campaignId});
    AdGroupPage page = adGroupService.get(selector);

    assertNotNull(page);
    assertNotNull(page.getEntries());
    assertTrue("Expected at least 1 entry", page.getTotalNumEntries() >=1 );
  }
View Full Code Here

  /**
   * Test getting all ad groups.
   */
  public void testGetAll() throws Exception{
    AdGroupSelector selector = new AdGroupSelector();
    AdGroupPage page = adGroupService.get(selector);

    assertNotNull(page);
    assertNotNull(page.getEntries());
    assertTrue("Expected at least 1 entry", page.getTotalNumEntries() >= 1);
  }
View Full Code Here

    AdGroupAdSelector selector = new AdGroupAdSelector();
    selector.setAdIds(new long[] {adId});

    // Create date range.
    DateRange range = new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today());
    selector.setStatsSelector(new AdStatsSelector(range, null));

    // Get ads with the selector created above.
    AdGroupAdPage page = service.get(selector);

    assertNotNull(page);
View Full Code Here

TOP

Related Classes of com.google.api.adwords.v201008.cm.AdGroupPage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.