Search in sources :

Example 16 with ProductDimension

use of com.google.api.ads.adwords.axis.v201809.cm.ProductDimension in project googleads-java-lib by googleads.

the class BaseProductDimensionComparatorTest method testCompareUnsupportedDimensionTypes_secondUnsupported_fails.

/**
 * Tests that the comparator throws an IllegalArgumentException when passed an instance of a
 * supported type as the first argument, and an instance of an unsupported subclass of
 * ProductDimension as the second argument.
 */
@Test
public void testCompareUnsupportedDimensionTypes_secondUnsupported_fails() {
    // Compare null to an unsupported type.
    ProductDimension unsupportedTypeOfDimension = new UnsupportedDimensionType();
    thrown.expect(IllegalArgumentException.class);
    comparator.compare(createOtherProductDimension(), unsupportedTypeOfDimension);
}
Also used : ProductDimension(com.google.api.ads.adwords.axis.v201809.cm.ProductDimension) Test(org.junit.Test)

Aggregations

ProductDimension (com.google.api.ads.adwords.axis.v201809.cm.ProductDimension)13 Test (org.junit.Test)12 ProductBrand (com.google.api.ads.adwords.axis.v201809.cm.ProductBrand)4 ProductBiddingCategory (com.google.api.ads.adwords.axis.v201809.cm.ProductBiddingCategory)2 ProductCanonicalCondition (com.google.api.ads.adwords.axis.v201809.cm.ProductCanonicalCondition)2 ProductCustomAttribute (com.google.api.ads.adwords.axis.v201809.cm.ProductCustomAttribute)2 ProductOfferId (com.google.api.ads.adwords.axis.v201809.cm.ProductOfferId)2 ProductType (com.google.api.ads.adwords.axis.v201809.cm.ProductType)2 NodeDifference (com.google.api.ads.adwords.axis.utils.v201809.shopping.ProductPartitionNodeDiffer.NodeDifference)1 AdGroupCriterion (com.google.api.ads.adwords.axis.v201809.cm.AdGroupCriterion)1 BiddableAdGroupCriterion (com.google.api.ads.adwords.axis.v201809.cm.BiddableAdGroupCriterion)1 BiddingStrategyConfiguration (com.google.api.ads.adwords.axis.v201809.cm.BiddingStrategyConfiguration)1 CampaignCriterion (com.google.api.ads.adwords.axis.v201809.cm.CampaignCriterion)1 CampaignCriterionOperation (com.google.api.ads.adwords.axis.v201809.cm.CampaignCriterionOperation)1 CampaignCriterionReturnValue (com.google.api.ads.adwords.axis.v201809.cm.CampaignCriterionReturnValue)1 CampaignCriterionServiceInterface (com.google.api.ads.adwords.axis.v201809.cm.CampaignCriterionServiceInterface)1 Money (com.google.api.ads.adwords.axis.v201809.cm.Money)1 ProductAdwordsGrouping (com.google.api.ads.adwords.axis.v201809.cm.ProductAdwordsGrouping)1 ProductAdwordsLabels (com.google.api.ads.adwords.axis.v201809.cm.ProductAdwordsLabels)1 ProductCanonicalConditionCondition (com.google.api.ads.adwords.axis.v201809.cm.ProductCanonicalConditionCondition)1