Commit 115703f
Refactor tests (#941)
* Refactored tests for HttpReadOnly/NoHttpPost/Patch/Delete controller attributes
* Refactored tests for casing convention
* Refactored tests for custom exception handler
* Refactored tests for nulls/default query string parameters; removed some duplication and fixed an equality bug.
* Refactored tests for DisableQueryStringAttribute
* Refactored tests for resource injection
* Fixed assertions on DateTime/DateTimeOffset in tests
* Refactored tests for non-json:api controllers
* Refactored tests for ActionResult usage
* Refactored tests for custom routes
* Refactored tests for links rendering
* Refactored tests for exception handling in serializer
* Refactored tests for serialization
* Refactored tests for resource hooks
* General cleanup
* Extracted test building blocks in shared project
* Auto-adjust namespaces
* Refactored tests for service discovery
* Refactored tests for no EF Core
* Renamed IntegrationTestContext to ExampleIntegrationTestContext because it has a strong dependency on EmptyStartup from JsonApiDotNetCoreExamples project.
* Adjusted test names for ModelStateValidationTests
* Adjusted test names for pagination
* Adjusted test names for meta
* Fixed broken tests; simpler bootstrap setup
* Adjusted test names for hooks
* Enable concurrent testruns (makes running all tests 60% faster)
* Removed unused using
* Cleanup tests for hooks
* Cleanup example models
* Revert "Enable concurrent testruns (makes running all tests 60% faster)" to investigate why cibuild hangs
This reverts commit d3ff09a.
* fixed failing testrunner
* Enable running integration tests in parallel
* test
* Disable duplicate builds
* Revert "Disable duplicate builds"
This reverts commit 38c127a.
* Addressed review feedback
* Moved integration tests for filter/include/page/sort/fields into QueryStrings subfolder and auto-adjusted namespaces.
* Move types into separate files
* Moved unit tests for query string parameters into ExampleTests project, so they can share private models with integration tests for query strings. They are likely to evolve simultaneously, so I prefer not to make a copy of them.
Renamed Blog to LegacyBlog in preparation for refactoring to make query string tests run against private models. LegacyBlog is going away at the end.
* Refactored query string integration tests to use private models. Changes:
LegacyBlog -> Blog
Title -> Title
CompanyName -> PlatformName
HasMany Articles -> Posts
HasOne Owner -> Owner
Article -> BlogPost
Caption -> Caption
Url -> Url
HasOne Author -> Author
+ HasOne Reviewer
HasManyThrough Tags -> Labels
HasMany Revisions -> Comments
HasOne Blog -> Parent
Tag -> Label
Name -> Name
Color -> Color
HasManyThrough Articles -> Posts
Revision -> Comment
+ Text
PublishTime -> CreatedAt
HasOne Author -> Author
HasOne Article -> Parent
Author -> WebAccount
FirstName/LastName -> UserName/DisplayName
+ Password
DateOfBirth -> DateOfBirth
BusinessEmail -> EmailAddress
LivingAddress -> Preferences
HasMany Articles -> Posts
Address -> AccountPreferences
+ UseDarkTheme
* Refactored query string unit tests to use private models.
* Cleanup models in example project
* Addressed review feedback
* Rename
* Refactored tests for logging
* Refactored tests for meta
* renamed ResourceHook tests and fixed a few wrong assertions
Co-authored-by: maurei <[email protected]>1 parent 569eebd commit 115703f
File tree
281 files changed
+9170
-7939
lines changed- docs/usage/extensibility
- src
- Examples
- GettingStarted/Data
- JsonApiDotNetCoreExample
- Controllers
- Restricted
- Data
- Definitions
- Models
- Services
- Startups
- NoEntityFrameworkExample/Services
- JsonApiDotNetCore/Serialization/Building
- test
- DiscoveryTests
- JsonApiDotNetCoreExampleTests
- Acceptance
- Extensibility
- HttpMethodRestrictions
- ResourceDefinitions
- Spec
- DocumentTests
- Factories
- Helpers
- Extensions
- Models
- IntegrationTests
- CompositeKeys
- ContentNegotiation
- ControllerActionResults
- CustomRoutes
- EagerLoading
- ExceptionHandling
- IdObfuscation
- Includes
- Links
- Logging
- Meta
- ModelStateValidation
- NamingConventions
- NonJsonApiControllers
- QueryStrings
- Filtering
- Includes
- Pagination
- Sorting
- SparseFieldSets
- ReadWrite
- Creating
- Deleting
- Fetching
- Updating
- Relationships
- Resources
- RequiredRelationships
- ResourceConstructorInjection
- ResourceDefinitions
- ResourceHooks
- ResourceInheritance
- RestrictedControllers
- Serialization
- SoftDeletion
- Sorting
- ZeroKeys
- Startups
- UnitTests/QueryStringParameters
- MultiDbContextTests
- NoEntityFrameworkTests
- TestBuildingBlocks
- UnitTests
- Controllers
- Data
- Extensions
- Internal
- Middleware
- Models
- ResourceHooks
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
281 files changed
+9170
-7939
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
199 | 201 | | |
200 | 202 | | |
201 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
202 | 216 | | |
203 | 217 | | |
204 | 218 | | |
| |||
216 | 230 | | |
217 | 231 | | |
218 | 232 | | |
| 233 | + | |
219 | 234 | | |
220 | 235 | | |
221 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 0 additions & 106 deletions
This file was deleted.
Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 0 additions & 18 deletions
This file was deleted.
0 commit comments