/** clean */ public void clean(List<AdGroupValues> adGroupValues) { try { AdGroupOperation removeAdGroupOperation = AdGroupServiceSample.createSampleRemoveRequest(accountId, adGroupValues); AdGroupServiceSample.set(removeAdGroupOperation); } catch (Exception e) { fail(); } }
/** Sample TestCase of remove method for AdGroupServiceSample. */ @Test public void testRemove() throws Exception { // ================================================================= // AdGroupService ADD // ================================================================= List<AdGroupValues> addAdGroupValues = null; try { AdGroupOperation addAdGroupOperation = AdGroupServiceSample.createSampleAddRequest( accountId, campaignId, appCampaignId, biddingStrategyId); addAdGroupValues = AdGroupServiceSample.add(addAdGroupOperation); } catch (Exception e) { fail(); } // ================================================================= // AdGroupService REMOVE // ================================================================= // Set Operation AdGroupOperation removeAdGroupOperation = AdGroupServiceSample.createSampleRemoveRequest(accountId, addAdGroupValues); // Run List<AdGroupValues> removeAdGroupValues = null; try { removeAdGroupValues = AdGroupServiceSample.set(removeAdGroupOperation); } catch (Exception e) { fail(); } // Assert for (AdGroupValues adGroupValues : removeAdGroupValues) { assertThat(adGroupValues.isOperationSucceeded(), is(true)); assertThat(adGroupValues.getAdGroup().getAccountId(), is(notNullValue())); } }