public async Task UpdateZoneAsync_ValidParameters_ExpectedClientCall() { UpdateZoneRequest req = new UpdateZoneRequest() { Description = "test description 1" }; IANSSafeDNSClient client = Substitute.For <IANSSafeDNSClient>(); var ops = new ZoneOperations <Zone>(client); await ops.UpdateZoneAsync("example.com", req); await client.Received().PatchAsync("/safedns/v1/zones/example.com", req); }
public async Task UpdateZoneAsync_InvalidZoneName_ThrowsANSClientValidationException() { var ops = new ZoneOperations <Zone>(null); await Assert.ThrowsExceptionAsync <ANSClientValidationException>(() => ops.UpdateZoneAsync("", null)); }