public void MarkAsFalsePositive_Should_Use_HttpForm() { _httpForm.Expect(h => h.Post(ApiKeyCheckUrl, It.IsAny <NameValueCollection>())).Returns(ValidApiKeyResponse).Verifiable(); _httpForm.Expect(h => h.PostAsync(FalsePositiveUrl, It.IsAny <NameValueCollection>())).Verifiable(); _spamProtection.MarkAsFalsePositive(CreateDummyContent()); _httpForm.Verify(); }
public void MarkAsFalsePositive_Should_Use_HttpForm() { _httpForm.Setup(h => h.Post(It.Is <HttpFormPostRequest>(r => r.Url == ApiKeyCheckUrl))).Returns(new HttpFormResponse { Response = ValidApiKeyResponse }).Verifiable(); _httpForm.Setup(h => h.PostAsync(It.IsAny <HttpFormPostRequest>())).Verifiable(); _spamProtection.MarkAsFalsePositive(CreateDummyContent()); _httpForm.Verify(); }