Example #1
0
        public async Task CreateDomainWAFAsync_InvalidDomainName_ThrowsUKFastClientValidationException()
        {
            var ops = new DomainWAFOperations <WAF>(null);

            await Assert.ThrowsExceptionAsync <UKFastClientValidationException>(() =>
                                                                                ops.CreateDomainWAFAsync("", new CreateWAFRequest()));
        }
Example #2
0
        public async Task CreateDomainWAFAsync_ExpectedResult()
        {
            var req = new CreateWAFRequest()
            {
                WAFMode       = "On",
                ParanoiaLevel = "Medium"
            };

            var ops = new DomainWAFOperations <WAF>(_client);
            await ops.CreateDomainWAFAsync("test-domain.co.uk", req);

            await _client.Received().PostAsync($"/ddosx/v1/domains/test-domain.co.uk/waf", req);
        }