public void AllEndpoints_Should_Return_NotAcceptable_For_InvalidSignature_FormDataRequest() { var request = Mother.CreateInvalidWebhookRequest(); SetupWebApiRequest(new FormUrlEncodedContent(request)); var actions = new Func <IHttpActionResult>[] { () => _sut.PostDeliver(new FormDataCollection(request)), () => _sut.PostOpen(new FormDataCollection(request)), () => _sut.PostUnsubscribe(new FormDataCollection(request)), () => _sut.PostClick(new FormDataCollection(request)), }; foreach (var action in actions) { var actual = action(); var acctualHttpResponse = actual.ExecuteAsync(CancellationToken.None).Result; Assert.That(acctualHttpResponse.StatusCode, Is.EqualTo(HttpStatusCode.NotAcceptable)); } }