Exemple #1
0
        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");
        }
Exemple #2
0
 public async Task DeleteZoneAsync_InvalidZoneName_ThrowsANSClientValidationException()
 {
     var ops = new ZoneOperations <Zone>(null);
     await Assert.ThrowsExceptionAsync <ANSClientValidationException>(() => ops.DeleteZoneAsync(""));
 }