Examples of CampaignServiceInterface


Examples of com.google.api.adwords.v200909.cm.CampaignServiceInterface

  public void testGetServiceAccountantStub() throws Exception {
    ServiceAccountantManager instance = ServiceAccountantManager.getInstance();
    instance.setAutoCreateAccountant(true);
    AdWordsUser testUser = new AdWordsUser("test_data/test.properties");

    CampaignServiceInterface campaignService =
        testUser.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    campaignService.get(new CampaignSelector());

    assertNotNull(instance.getServiceAccountant((Stub) campaignService));
  }
View Full Code Here

Examples of com.google.api.adwords.v200909.cm.CampaignServiceInterface

  public void testGetServiceAccountantService() throws Exception {
    ServiceAccountantManager instance = ServiceAccountantManager.getInstance();
    instance.setAutoCreateAccountant(true);
    AdWordsUser testUser = new AdWordsUser("test_data/test.properties");

    CampaignServiceInterface campaignService =
        testUser.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    campaignService.get(new CampaignSelector());

    assertNotNull(instance.getServiceAccountant(((Stub) campaignService)._getService()));
  }
View Full Code Here

Examples of com.google.api.adwords.v200909.cm.CampaignServiceInterface

  public void testRemoveServiceRemote() throws Exception {
    ServiceAccountantManager instance = ServiceAccountantManager.getInstance();
    instance.setAutoCreateAccountant(true);
    AdWordsUser testUser = new AdWordsUser("test_data/test.properties");

    CampaignServiceInterface campaignService =
        testUser.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    campaignService.get(new CampaignSelector());

    instance.removeService(campaignService);
    assertTrue("Service was not removed.", instance.getNumberRegisteredServices() == 0);
  }
View Full Code Here

Examples of com.google.api.adwords.v200909.cm.CampaignServiceInterface

  public void testRemoveServiceStub() throws Exception {
    ServiceAccountantManager instance = ServiceAccountantManager.getInstance();
    instance.setAutoCreateAccountant(true);
    AdWordsUser testUser = new AdWordsUser("test_data/test.properties");

    CampaignServiceInterface campaignService =
        testUser.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    campaignService.get(new CampaignSelector());

    instance.removeService((Stub) campaignService);
    assertTrue("Service was not removed.", instance.getNumberRegisteredServices() == 0);
  }
View Full Code Here

Examples of com.google.api.adwords.v200909.cm.CampaignServiceInterface

  public void testRemoveServiceService() throws Exception {
    ServiceAccountantManager instance = ServiceAccountantManager.getInstance();
    instance.setAutoCreateAccountant(true);
    AdWordsUser testUser = new AdWordsUser("test_data/test.properties");

    CampaignServiceInterface campaignService =
        testUser.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    campaignService.get(new CampaignSelector());

    instance.removeService(((Stub) campaignService)._getService());
    assertTrue("Service was not removed.", instance.getNumberRegisteredServices() == 0);
  }
View Full Code Here

Examples of com.google.api.adwords.v200909.cm.CampaignServiceInterface

  public void testClear() throws Exception {
    ServiceAccountantManager instance = ServiceAccountantManager.getInstance();
    instance.setAutoCreateAccountant(true);
    AdWordsUser testUser = new AdWordsUser("test_data/test.properties");

    CampaignServiceInterface campaignService =
        testUser.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    campaignService.get(new CampaignSelector());
    campaignService = testUser.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
    campaignService.get(new CampaignSelector());

    instance.clear();

    assertTrue("Services were not removed.", instance.getNumberRegisteredServices() == 0);
    assertTrue("Services were not removed.", instance.getNumberRegisteredServices(testUser) == 0);
View Full Code Here

Examples of com.google.api.adwords.v200909.cm.CampaignServiceInterface

        instance.getNumberRegisteredServices() == 0);

    AdWordsUser testUser1 = new AdWordsUser("test_data/test.properties");
    AdWordsUser testUser2 = new AdWordsUser("test_data/test.properties");
    AdWordsUser testUser3 = 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());
    instance.removeAllServicesForUser(testUser1);
    assertEquals(1, instance.getNumberRegisteredServices());
    instance.removeAllServicesForUser(testUser2);
View Full Code Here

Examples of com.google.api.adwords.v200909.cm.CampaignServiceInterface

    assertTrue("No services should be registered yet.",
        instance.getNumberRegisteredServices() == 0);

    AdWordsUser testUser1 = new AdWordsUser("test_data/test.properties");
    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

Examples of com.google.api.adwords.v200909.cm.CampaignServiceInterface

    assertTrue("No services should be registered yet.",
        instance.getNumberRegisteredServices() == 0);

    AdWordsUser testUser1 = new AdWordsUser("test_data/test.properties");
    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

Examples of com.google.api.adwords.v200909.cm.CampaignServiceInterface

    assertTrue("No services should be registered yet.",
        instance.getNumberRegisteredServices() == 0);

    AdWordsUser testUser1 = new AdWordsUser("test_data/test.properties");
    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
TOP
Copyright © 2018 www.massapi.com. 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.