public async Task DeleteZoneAsync_ValidParameters_ExpectedClientCall() { IANSSafeDNSClient client = Substitute.For <IANSSafeDNSClient>(); var ops = new ZoneOperations <Zone>(client); await ops.DeleteZoneAsync("example.com"); await client.Received().DeleteAsync("/safedns/v1/zones/example.com"); }
public async Task DeleteZoneAsync_InvalidZoneName_ThrowsANSClientValidationException() { var ops = new ZoneOperations <Zone>(null); await Assert.ThrowsExceptionAsync <ANSClientValidationException>(() => ops.DeleteZoneAsync("")); }