public async Task UpdateDomainWAFRuleAsync_InvalidWAFRuleID_ThrowsUKFastClientValidationException() { var ops = new DomainWAFRuleOperations <WAFRule>(null); await Assert.ThrowsExceptionAsync <UKFastClientValidationException>(() => ops.UpdateDomainWAFRuleAsync("test-domain.co.uk", "", new UpdateWAFRuleRequest())); }
public async Task UpdateDomainWAFRuleAsync_ExpectedResult() { var req = new UpdateWAFRuleRequest() { URI = "test.html" }; var ops = new DomainWAFRuleOperations <WAFRule>(_client); await ops.UpdateDomainWAFRuleAsync("test-domain.co.uk", "00000000-0000-0000-0000-000000000000", req); await _client.Received() .PatchAsync($"/ddosx/v1/domains/test-domain.co.uk/waf/rules/00000000-0000-0000-0000-000000000000", req); }