Package com.google.api.ads.adwords.jaxws.v201309.mcm

Examples of com.google.api.ads.adwords.jaxws.v201309.mcm.Customer


   * Tests that the built selectors don't share internal OrderBy state.
   */
  @Test
  public void testUniqueInternalOrderByState() {
    SelectorBuilder builder = new SelectorBuilder();
    Selector selectorOne = builder.orderAscBy("Id").build();
    Selector selectorTwo = builder.build();

    OrderBy orderTwo = selectorTwo.getOrdering().get(0);
    orderTwo.setField("Status");

    Assert.assertEquals("Id", selectorOne.getOrdering().get(0).getField());
    Assert.assertEquals("Status", selectorTwo.getOrdering().get(0).getField());
  }
View Full Code Here


   * Tests that the built selectors don't share internal Predicate state.
   */
  @Test
  public void testUniqueInternalPredicateState() {
    SelectorBuilder builder = new SelectorBuilder();
    Selector selectorOne = builder.by("Id", "test").build();
    Selector selectorTwo = builder.build();

    Predicate predicateTwo = selectorTwo.getPredicates().get(0);
    predicateTwo.setField("Status");

    Assert.assertEquals("Id", selectorOne.getPredicates().get(0).getField());
    Assert.assertEquals("Status", selectorTwo.getPredicates().get(0).getField());
  }
View Full Code Here

    DateTime startOne = new DateTime(2013, 1, 1, 0, 0, 0, 0);
    DateTime endOne = new DateTime(2013, 1, 31, 0, 0, 0, 0);
    DateTime startTwo = new DateTime(2013, 2, 1, 0, 0, 0, 0);
    DateTime endTwo = new DateTime(2013, 2, 28, 0, 0, 0, 0);

    Selector selectorOne = builder.forDateRange(startOne, endOne).build();
    Selector selectorTwo = builder.forDateRange(startTwo, endTwo).build();

    Assert.assertEquals(dateFormat.format(startOne.toDate()), selectorOne.getDateRange().getMin());
    Assert.assertEquals(dateFormat.format(endOne.toDate()), selectorOne.getDateRange().getMax());
    Assert.assertEquals(dateFormat.format(startTwo.toDate()), selectorTwo.getDateRange().getMin());
    Assert.assertEquals(dateFormat.format(endTwo.toDate()), selectorTwo.getDateRange().getMax());
  }
View Full Code Here

    kratuProcessor.setPersister(mockedEntitiesPersister);
    kratuProcessor.setReportProcessor(mockedReportProcessor);
    storageHelper.setPersister(mockedEntitiesPersister);

    Customer customer1 = new Customer();
    customer1.setCustomerId(1L);
    Customer customer2 = new Customer();
    customer2.setCustomerId(2L);
    List<Customer> customers = ImmutableList.of(customer1, customer2);
    when(mockedReportProcessor.getAccountsInfo(
        Mockito.anyString(), Mockito.anyString(), Mockito.anySetOf(Long.class))).thenReturn(customers);
  }
View Full Code Here

          // Try to get the MCC Company Name and DescriptiveName
          String name = "";
          try {
            AdWordsSession adWordsSession = authenticate(null, mccAccountId, credential).build();
            CustomerDelegate customerDelegate = new CustomerDelegate(adWordsSession);         
            Customer customer = customerDelegate.getCustomer();
            name = customer.getCompanyName() + " (" + customer.getDescriptiveName() + ")";
          } catch (ValidationException e) {
            LOGGER.error("Error trying to get MCC Name " + e.getMessage());
          } catch (ApiException e) {
            LOGGER.error("Error trying to get MCC Name " + e.getMessage());
          }
View Full Code Here

TOP

Related Classes of com.google.api.ads.adwords.jaxws.v201309.mcm.Customer

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.