public final class RemoveLocation extends UpdateActionImpl<Zone>
See also ZoneUpdateCommand.
ZoneFixtures.withUpdateableZone(client(), zone -> { //adding a location final Location newLocation = Location.of(CountryCode.AQ, "state"); assertThat(zone.getLocations().contains(newLocation)).isFalse(); final ZoneUpdateCommand addCommand = ZoneUpdateCommand.of(zone, AddLocation.of(newLocation)); final Zone zoneWithNewLocation = client().executeBlocking(addCommand); assertThat(zoneWithNewLocation.getLocations()).contains(newLocation); //removing a location final ZoneUpdateCommand removeCommand = ZoneUpdateCommand.of(zoneWithNewLocation, RemoveLocation.of(newLocation)); final Zone zoneWithoutNewLocation = client().executeBlocking(removeCommand); assertThat(zoneWithoutNewLocation.getLocations().contains(newLocation)).isFalse(); return zoneWithoutNewLocation; }, CountryCode.AO);
See the test code.
Modifier and Type | Method and Description |
---|---|
Location |
getLocation() |
static RemoveLocation |
of(Location location) |
getAction
public static RemoveLocation of(Location location)
public Location getLocation()