@Test public void testZoneUpdate_noop() { Zone before = mgr.api().zones().iterateByName("denominator.io.").next(); ZoneUpdate command = new ZoneUpdate(); command.id = before.id(); command.ttl = before.ttl(); command.email = before.email(); assertThat(command.doRun(mgr)).containsExactly( ";; ok"); assertThat(mgr.api().zones().iterateByName(before.name())) .contains(before); }
static String id(DNSApiManager mgr, String zoneIdOrName) { if (zoneIdOrName.indexOf('.') == -1) { return zoneIdOrName; } if (zoneNameIsId(mgr.provider())) { return zoneIdOrName; } Iterator<Zone> result = mgr.api().zones().iterateByName(zoneIdOrName); checkArgument(result.hasNext(), "zone %s not found", zoneIdOrName); return result.next().id(); }
Denominator { static String id(DNSApiManager mgr, String zoneIdOrName) { if (zoneIdOrName.indexOf('.') == -1) { return zoneIdOrName; } if (zoneNameIsId(mgr.provider())) { return zoneIdOrName; } Iterator<Zone> result = mgr.api().zones().iterateByName(zoneIdOrName); checkArgument(result.hasNext(), "zone %s not found", zoneIdOrName); return result.next().id(); } }
Denominator { static String id(DNSApiManager mgr, String zoneIdOrName) { if (zoneIdOrName.indexOf('.') == -1) { return zoneIdOrName; } if (zoneNameIsId(mgr.provider())) { return zoneIdOrName; } Iterator<Zone> result = mgr.api().zones().iterateByName(zoneIdOrName); checkArgument(result.hasNext(), "zone %s not found", zoneIdOrName); return result.next().id(); }  }
Denominator { static String id(DNSApiManager mgr, String zoneIdOrName) { if (zoneIdOrName.indexOf('.') == -1) { return zoneIdOrName; } if (zoneNameIsId(mgr.provider())) { return zoneIdOrName; } Iterator<Zone> result = mgr.api().zones().iterateByName(zoneIdOrName); checkArgument(result.hasNext(), "zone %s not found", zoneIdOrName); return result.next().id(); }  static void main(String[] args); }
Denominator { static String id(DNSApiManager mgr, String zoneIdOrName) { if (zoneIdOrName.indexOf('.') == -1) { return zoneIdOrName; } if (zoneNameIsId(mgr.provider())) { return zoneIdOrName; } Iterator<Zone> result = mgr.api().zones().iterateByName(zoneIdOrName); checkArgument(result.hasNext(), "zone %s not found", zoneIdOrName); return result.next().id(); }  static void main(String[] args);  }