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

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


    AdWordsUser testUser2 = new AdWordsUser("test_data/test.properties");
    CampaignServiceInterface campaignService1 =
        testUser1.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    CampaignServiceInterface campaignService2 =
        testUser2.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    campaignService1.get(new CampaignSelector());
    campaignService2.get(new CampaignSelector());

    assertEquals(2, instance.getNumberRegisteredServices());
  }
View Full Code Here


    AdWordsUser testUser2 = new AdWordsUser("test_data/test.properties");
    CampaignServiceInterface campaignService1 =
        testUser1.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    CampaignServiceInterface campaignService2 =
        testUser2.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    campaignService1.get(new CampaignSelector());
    campaignService2.get(new CampaignSelector());

    assertEquals(2, instance.getNumberRegisteredServices());
    assertEquals(1, instance.getNumberRegisteredServices(testUser1));
    assertEquals(1, instance.getNumberRegisteredServices(testUser2));
  }
View Full Code Here

    AdWordsUser testUser2 = new AdWordsUser("test_data/test.properties");
    CampaignServiceInterface campaignService1 =
        testUser1.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    CampaignServiceInterface campaignService2 =
        testUser2.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    campaignService1.get(new CampaignSelector());
    campaignService2.get(new CampaignSelector());

    instance.setRetainServices(true);

    CampaignServiceInterface campaignService3 =
        testUser1.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    CampaignServiceInterface campaignService4 =
        testUser2.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    campaignService3.get(new CampaignSelector());
    campaignService4.get(new CampaignSelector());

    assertEquals(4, instance.getNumberRegisteredServices());
    assertEquals(2, instance.getNumberRetainedServices());
    assertEquals(campaignService3, instance.getRetainedServicesForUser(testUser1)[0]);
    assertEquals(campaignService4, instance.getRetainedServicesForUser(testUser2)[0]);
View Full Code Here

    AdWordsUser testUser2 = new AdWordsUser("test_data/test.properties");
    CampaignServiceInterface campaignService1 =
        testUser1.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    CampaignServiceInterface campaignService2 =
        testUser2.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    campaignService1.get(new CampaignSelector());
    campaignService2.get(new CampaignSelector());

    assertEquals(2, instance.getAllRetainedServices().keySet().size());
    instance.setRetainServices(true);

    CampaignServiceInterface campaignService3 =
        testUser1.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    CampaignServiceInterface campaignService4 =
        testUser2.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    campaignService3.get(new CampaignSelector());
    campaignService4.get(new CampaignSelector());

    assertEquals(4, instance.getNumberRegisteredServices());
    assertEquals(2, instance.getNumberRetainedServices());

    Map<AdWordsUser, Stub[]> allRetainedServices = instance.getAllRetainedServices();
View Full Code Here

    instance.setAutoCreateAccountant(false);

    AdWordsUser testUser = new AdWordsUser("test_data/test.properties");
    CampaignServiceInterface campaignService =
        testUser.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    campaignService.get(new CampaignSelector());

    assertNull("No service accountant should be created.", instance
        .getServiceAccountant(campaignService));

    ServiceAccountant serviceAccountant =
        ServiceAccountantManager.createServiceAccountant((Stub) campaignService);
    assertTrue("Service accountant should be empty.", serviceAccountant.getTotalUnitCount() == 0);

    campaignService.get(new CampaignSelector());

    long totalUnits = serviceAccountant.getTotalUnitCount();
    assertTrue("Service accountant not used.", totalUnits > 0);

    instance.clear();

    campaignService.get(new CampaignSelector());

    assertEquals("Service accountant still used.", totalUnits, serviceAccountant
        .getTotalUnitCount());
  }
View Full Code Here

    instance.setAutoCreateAccountant(false);

    AdWordsUser testUser = new AdWordsUser("test_data/test.properties");
    CampaignServiceInterface campaignService =
        testUser.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    campaignService.get(new CampaignSelector());

    assertNull("No service accountant should be created.", instance
        .getServiceAccountant(campaignService));

    ServiceAccountant serviceAccountant =
        ServiceAccountantManager.createServiceAccountant(campaignService);
    assertTrue("Service accountant should be empty.", serviceAccountant.getTotalUnitCount() == 0);

    campaignService.get(new CampaignSelector());

    long totalUnits = serviceAccountant.getTotalUnitCount();
    assertTrue("Service accountant not used.", totalUnits > 0);

    instance.clear();

    campaignService.get(new CampaignSelector());

    assertEquals("Service accountant still used.", totalUnits, serviceAccountant
        .getTotalUnitCount());
  }
View Full Code Here

    instance.setAutoCreateAccountant(false);

    AdWordsUser testUser = new AdWordsUser("test_data/test.properties");
    CampaignServiceInterface campaignService =
        testUser.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    campaignService.get(new CampaignSelector());

    assertNull("No service accountant should be created.", instance
        .getServiceAccountant(campaignService));

    ServiceAccountant serviceAccountant =
        ServiceAccountantManager.createServiceAccountant(((Stub) campaignService)._getService());
    assertTrue("Service accountant should be empty.", serviceAccountant.getTotalUnitCount() == 0);

    campaignService.get(new CampaignSelector());

    long totalUnits = serviceAccountant.getTotalUnitCount();
    assertTrue("Service accountant not used.", totalUnits > 0);

    instance.clear();

    campaignService.get(new CampaignSelector());

    assertEquals("Service accountant still used.", totalUnits, serviceAccountant
        .getTotalUnitCount());
  }
View Full Code Here

            CampaignServiceInterface campaignService =
                testUser.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
            AdGroupServiceInterface adGroupService =
                testUser.getService(AdWordsService.V200909.ADGROUP_SERVICE);

            campaignService.get(new CampaignSelector());
            adGroupService.get(new AdGroupSelector());

            ServiceAccountant campaignServiceAccountant =
                ServiceAccountantManager.getInstance().getServiceAccountant(campaignService);
View Full Code Here

    CampaignServiceInterface campaignService =
        testUser.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    AdGroupServiceInterface adGroupService =
        testUser.getService(AdWordsService.V200909.ADGROUP_SERVICE);

    campaignService.get(new CampaignSelector());
    adGroupService.get(new AdGroupSelector());
  }
View Full Code Here

  /**
   * Test updating an ad group ad.
   */
  public void testUpdate() throws Exception {
    // Create ad with updated status.
    Ad ad = new Ad();
    ad.setId(adId);

    // Create ad with updated status
    AdGroupAd adGroupAd = new AdGroupAd();
    adGroupAd.setAdGroupId(adGroupId);
    adGroupAd.setAd(ad);
View Full Code Here

TOP

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

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.