public void UpdateGeoTargetsPut_RemoveTarget() { CampaignControllerPut controller = new CampaignControllerPut(); List <GeoLocation> list = new List <GeoLocation>(); list.Add(new GeoLocation() { City = "Miami", State = "Florida" }); UpdateGeoTargetsRequest request = new UpdateGeoTargetsRequest() { GeoLocation = list, UpdateMode = UpdateMode.Remove }; UpdateGeoTargetsResponse response = controller.UpdateCampaignGeoTargets("927060915", request); Assert.That(response.Success, Is.True); }
public void UpdateGeoTargetsPut_EmptyGeoLocationList() { CampaignControllerPut controller = new CampaignControllerPut(); List <GeoLocation> list = new List <GeoLocation>(); UpdateGeoTargetsRequest request = new UpdateGeoTargetsRequest() { GeoLocation = list, UpdateMode = UpdateMode.Remove }; try { UpdateGeoTargetsResponse response = controller.UpdateCampaignGeoTargets("927060915", request); Assert.That(false); } catch (Exception e) { Assert.That(e.Message, Is.Not.Empty); } }