-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: restore tests and fix them (#254)
* fix: restore tests * feat: add nocontent tests * fix: add tests for fsproj * fix: method names * fix: map endpoints * fix: formatting * fix: some PetStore tests * fix: petstore * fix: more tests * fix: user agent parsing * fix: one platform for testing should be enough
- Loading branch information
1 parent
2f09c7a
commit a4d902a
Showing
17 changed files
with
98 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
tests/SwaggerProvider.ProviderTests/v3/Swashbuckle.NoContentControllers.Tests.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module Swashbuckle.v3.NoContentControllersTests | ||
|
||
open Xunit | ||
open Swashbuckle.v3.ReturnControllersTests | ||
|
||
[<Fact>] | ||
let ``Test 204 with GET``() = | ||
task { do! api.GetApiNoContent() } | ||
|
||
[<Fact>] | ||
let ``Test 204 with POST``() = | ||
task { do! api.PostApiNoContent() } | ||
|
||
[<Fact>] | ||
let ``Test 204 with PUT``() = | ||
task { do! api.PutApiNoContent() } | ||
|
||
[<Fact>] | ||
let ``Test 204 with DELETE``() = | ||
task { do! api.DeleteApiNoContent() } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
tests/Swashbuckle.WebApi.Server/Controllers/NoContentControllers.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
namespace Swashbuckle.WebApi.Server.Controllers | ||
|
||
open Microsoft.AspNetCore.Mvc | ||
|
||
[<Route("api/[controller]")>] | ||
[<ApiController>] | ||
type NoContentController() = | ||
inherit ControllerBase() | ||
|
||
[<HttpGet>] | ||
[<Produces("application/json")>] | ||
[<ProducesResponseType(204)>] | ||
member x.Get() = | ||
x.NoContent() | ||
|
||
[<HttpPost>] | ||
[<Produces("application/json")>] | ||
[<ProducesResponseType(204)>] | ||
member x.Post() = | ||
x.NoContent() | ||
|
||
[<HttpPut>] | ||
[<Produces("application/json")>] | ||
[<ProducesResponseType(204)>] | ||
member x.Put() = | ||
x.NoContent() | ||
|
||
[<HttpDelete>] | ||
[<Produces("application/json")>] | ||
[<ProducesResponseType(204)>] | ||
member x.Delete() = | ||
x.NoContent() |
2 changes: 0 additions & 2 deletions
2
tests/Swashbuckle.WebApi.Server/Controllers/SpecialCasesControllers.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 1 addition & 5 deletions
6
tests/Swashbuckle.WebApi.Server/Controllers/ValuesController.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters