2 instantiations of Created
Microsoft.AspNetCore.Http.Results (2)
36 references to Created
Microsoft.AspNetCore.Http.Results (4)
Microsoft.AspNetCore.Http.Results.Tests (30)
CreatedOfTResultTests.cs (10)
24var result = new Created<HttpValidationProblemDetails>(expectedUrl, obj);
39var result = new Created<string>(location, "testInput");
51var result = new Created<string>(location, "testInput");
68var result = new Created<string>(location, "testInput");
87var result = new Created<string>(location, "testInput");
101Created<Todo> MyApi() { throw new NotImplementedException(); }
106PopulateMetadata<Created<Todo>>(((Delegate)MyApi).GetMethodInfo(), builder);
119var result = new Created<object>("location", null);
130Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Created<object>>(null, new RouteEndpointBuilder(requestDelegate: null, RoutePatternFactory.Parse("/"), order: 0)));
131Assert.Throws<ArgumentNullException>("builder", () => PopulateMetadata<Created<object>>(((Delegate)PopulateMetadata_ThrowsArgumentNullException_WhenMethodOrBuilderAreNull).GetMethodInfo(), null));
ResultsTests.cs (15)
588var result = Results.Created(uri, value) as Created<object>;
604var result = Results.Created(uri, value) as Created<Todo>;
634var result = Results.Created(uri, value) as Created<object>;
650var result = Results.Created(uri, value) as Created<Todo>;
709var result = Results.Created(default(string), value) as Created<object>;
723var result = Results.Created(string.Empty, value) as Created<object>;
737var result = Results.Created(default(Uri), value) as Created<object>;
1746(() => Results.Created("/path", new()), typeof(Created<object>)),
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (2)