Example #1
0
        public static IEnumerable <IAssertion> Http404NotFound()
        {
            // Request
            yield return(ApiConventionFor.RequestMethodIs(HttpMethod.Get));

            // Response
            yield return(ApiConventionFor.ResponseStatusIs(HttpStatusCode.NotFound));
        }
Example #2
0
        public static IEnumerable <IAssertion> GetListOfResources()
        {
            // Request
            yield return(ApiConventionFor.RequestMethodIs(HttpMethod.Get));

            // Response
            yield return(ApiConventionFor.ResponseStatusIs(HttpStatusCode.OK));

            yield return(ApiConventionFor.ResponseContentTypeIs(MediaTypeNames.Application.Json));
        }
Example #3
0
        public static IEnumerable <IAssertion> GetSingleResourceThatDoNotExist()
        {
            // Request
            yield return(ApiConventionFor.RequestMethodIs(HttpMethod.Get));

            // Response
            yield return(ApiConventionFor.ResponseStatusIs(HttpStatusCode.NotFound));

            yield return(ApiConventionFor.ResponseContentTypeIs(MediaType.Application.ProblemJson));
        }
Example #4
0
 private static IEnumerable <IAssertion> CreationRequest()
 {
     yield return(ApiConventionFor.RequestMethodIs(HttpMethod.Post));
 }