diff --git a/benchmarks/Deserialization/DeserializationBenchmarkBase.cs b/benchmarks/Deserialization/DeserializationBenchmarkBase.cs index 4febabba1a..018f220994 100644 --- a/benchmarks/Deserialization/DeserializationBenchmarkBase.cs +++ b/benchmarks/Deserialization/DeserializationBenchmarkBase.cs @@ -21,7 +21,7 @@ public abstract class DeserializationBenchmarkBase : IDisposable protected DeserializationBenchmarkBase() { var options = new JsonApiOptions(); - IResourceGraph resourceGraph = new ResourceGraphBuilder(options, NullLoggerFactory.Instance).Add().Build(); + IResourceGraph resourceGraph = new ResourceGraphBuilder(options, NullLoggerFactory.Instance).Add().Build(); options.SerializerOptions.Converters.Add(new ResourceObjectConverter(resourceGraph)); SerializerReadOptions = ((IJsonApiOptions)options).SerializerReadOptions; @@ -29,7 +29,7 @@ protected DeserializationBenchmarkBase() var resourceDefinitionAccessor = new ResourceDefinitionAccessor(resourceGraph, _serviceProvider); _serviceProvider.AddService(typeof(IResourceDefinitionAccessor), resourceDefinitionAccessor); - _serviceProvider.AddService(typeof(IResourceDefinition), new JsonApiResourceDefinition(resourceGraph)); + _serviceProvider.AddService(typeof(IResourceDefinition), new JsonApiResourceDefinition(resourceGraph)); // ReSharper disable once VirtualMemberCallInConstructor JsonApiRequest request = CreateJsonApiRequest(resourceGraph); @@ -71,7 +71,7 @@ private void Dispose(bool disposing) } [UsedImplicitly(ImplicitUseTargetFlags.Members)] - public sealed class IncomingResource : Identifiable + public sealed class IncomingResource : Identifiable { [Attr] public bool Attribute01 { get; set; } diff --git a/benchmarks/QueryString/QueryStringParserBenchmarks.cs b/benchmarks/QueryString/QueryStringParserBenchmarks.cs index 5e5a65ed9f..718d9a697d 100644 --- a/benchmarks/QueryString/QueryStringParserBenchmarks.cs +++ b/benchmarks/QueryString/QueryStringParserBenchmarks.cs @@ -27,7 +27,7 @@ public QueryStringParserBenchmarks() EnableLegacyFilterNotation = true }; - IResourceGraph resourceGraph = new ResourceGraphBuilder(options, NullLoggerFactory.Instance).Add("alt-resource-name").Build(); + IResourceGraph resourceGraph = new ResourceGraphBuilder(options, NullLoggerFactory.Instance).Add("alt-resource-name").Build(); var request = new JsonApiRequest { diff --git a/benchmarks/QueryString/QueryableResource.cs b/benchmarks/QueryString/QueryableResource.cs index 7c26474ae4..8e80034f88 100644 --- a/benchmarks/QueryString/QueryableResource.cs +++ b/benchmarks/QueryString/QueryableResource.cs @@ -5,7 +5,7 @@ namespace Benchmarks.QueryString; [UsedImplicitly(ImplicitUseTargetFlags.Members)] -public sealed class QueryableResource : Identifiable +public sealed class QueryableResource : Identifiable { [Attr(PublicName = "alt-attr-name")] public string? Name { get; set; } diff --git a/benchmarks/Serialization/SerializationBenchmarkBase.cs b/benchmarks/Serialization/SerializationBenchmarkBase.cs index c8451835cc..2ab328c074 100644 --- a/benchmarks/Serialization/SerializationBenchmarkBase.cs +++ b/benchmarks/Serialization/SerializationBenchmarkBase.cs @@ -31,7 +31,7 @@ protected SerializationBenchmarkBase() } }; - ResourceGraph = new ResourceGraphBuilder(options, NullLoggerFactory.Instance).Add().Build(); + ResourceGraph = new ResourceGraphBuilder(options, NullLoggerFactory.Instance).Add().Build(); SerializerWriteOptions = ((IJsonApiOptions)options).SerializerWriteOptions; // ReSharper disable VirtualMemberCallInConstructor @@ -55,7 +55,7 @@ protected SerializationBenchmarkBase() protected abstract IEvaluatedIncludeCache CreateEvaluatedIncludeCache(IResourceGraph resourceGraph); [UsedImplicitly(ImplicitUseTargetFlags.Members)] - public sealed class OutgoingResource : Identifiable + public sealed class OutgoingResource : Identifiable { [Attr] public bool Attribute01 { get; set; } diff --git a/docs/usage/errors.md b/docs/usage/errors.md index 955612dc67..b05eaee21f 100644 --- a/docs/usage/errors.md +++ b/docs/usage/errors.md @@ -34,9 +34,9 @@ This handler is also the place to choose the log level and message, based on the ```c# public class ProductOutOfStockException : Exception { - public int ProductId { get; } + public long ProductId { get; } - public ProductOutOfStockException(int productId) + public ProductOutOfStockException(long productId) { ProductId = productId; } diff --git a/docs/usage/extensibility/controllers.md b/docs/usage/extensibility/controllers.md index 94a1f93a8e..4a6c56ad9a 100644 --- a/docs/usage/extensibility/controllers.md +++ b/docs/usage/extensibility/controllers.md @@ -126,10 +126,10 @@ You can even make your own mix of allowed routes by calling the alternate constr In some cases, resources may be an aggregation of entities or a view on top of the underlying entities. In these cases, there may not be a writable `IResourceService` implementation, so simply inject the implementation that is available. ```c# -public class ReportsController : JsonApiController +public class ReportsController : JsonApiController { public ReportsController(IJsonApiOptions options, IResourceGraph resourceGraph, - ILoggerFactory loggerFactory, IGetAllService getAllService) + ILoggerFactory loggerFactory, IGetAllService getAllService) : base(options, resourceGraph, loggerFactory, getAll: getAllService) { } diff --git a/docs/usage/extensibility/repositories.md b/docs/usage/extensibility/repositories.md index 733634bf33..889fa31f5f 100644 --- a/docs/usage/extensibility/repositories.md +++ b/docs/usage/extensibility/repositories.md @@ -5,9 +5,9 @@ If you only need minor changes you can override the methods defined in `EntityFr ```c# // Program.cs -builder.Services.AddScoped, ArticleRepository>(); -builder.Services.AddScoped, ArticleRepository>(); -builder.Services.AddScoped, ArticleRepository>(); +builder.Services.AddScoped, ArticleRepository>(); +builder.Services.AddScoped, ArticleRepository>(); +builder.Services.AddScoped, ArticleRepository>(); ``` In v4.0 we introduced an extension method that you can use to register a resource repository on all of its JsonApiDotNetCore interfaces. @@ -26,7 +26,7 @@ A sample implementation that performs authorization might look like this. All of the methods in EntityFrameworkCoreRepository will use the `GetAll()` method to get the `DbSet`, so this is a good method to apply filters such as user or tenant authorization. ```c# -public class ArticleRepository : EntityFrameworkCoreRepository +public class ArticleRepository : EntityFrameworkCoreRepository { private readonly IAuthenticationService _authenticationService; diff --git a/docs/usage/extensibility/resource-definitions.md b/docs/usage/extensibility/resource-definitions.md index 644d43fb75..550df7c369 100644 --- a/docs/usage/extensibility/resource-definitions.md +++ b/docs/usage/extensibility/resource-definitions.md @@ -18,7 +18,7 @@ builder.Services.AddResourceDefinition(); > [!NOTE] > Prior to the introduction of auto-discovery (in v3), you needed to register the resource definition on the container yourself: > ```c# -> builder.Services.AddScoped, ArticleDefinition>(); +> builder.Services.AddScoped, ArticleDefinition>(); > ``` ## Customizing queries @@ -41,7 +41,7 @@ For example, you may accept some sensitive data that should only be exposed to a > To exclude fields unconditionally, [attribute capabilities](~/usage/resources/attributes.md#capabilities) and [relationship capabilities](~/usage/resources/relationships.md#capabilities) can be used instead. ```c# -public class UserDefinition : JsonApiResourceDefinition +public class UserDefinition : JsonApiResourceDefinition { public UserDefinition(IResourceGraph resourceGraph) : base(resourceGraph) @@ -100,7 +100,7 @@ Content-Type: application/vnd.api+json You can define the default sort order if no `sort` query string parameter is provided. ```c# -public class AccountDefinition : JsonApiResourceDefinition +public class AccountDefinition : JsonApiResourceDefinition { public AccountDefinition(IResourceGraph resourceGraph) : base(resourceGraph) @@ -128,7 +128,7 @@ public class AccountDefinition : JsonApiResourceDefinition You may want to enforce pagination on large database tables. ```c# -public class AccessLogDefinition : JsonApiResourceDefinition +public class AccessLogDefinition : JsonApiResourceDefinition { public AccessLogDefinition(IResourceGraph resourceGraph) : base(resourceGraph) @@ -159,7 +159,7 @@ public class AccessLogDefinition : JsonApiResourceDefinition The next example filters out `Account` resources that are suspended. ```c# -public class AccountDefinition : JsonApiResourceDefinition +public class AccountDefinition : JsonApiResourceDefinition { public AccountDefinition(IResourceGraph resourceGraph) : base(resourceGraph) @@ -188,7 +188,7 @@ public class AccountDefinition : JsonApiResourceDefinition In the example below, an error is returned when a user tries to include the manager of an employee. ```c# -public class EmployeeDefinition : JsonApiResourceDefinition +public class EmployeeDefinition : JsonApiResourceDefinition { public EmployeeDefinition(IResourceGraph resourceGraph) : base(resourceGraph) @@ -224,7 +224,7 @@ If the key is present in a query string, the supplied LINQ expression will be ad But it only works on primary resource endpoints (for example: /articles, but not on /blogs/1/articles or /blogs?include=articles). ```c# -public class ItemDefinition : JsonApiResourceDefinition +public class ItemDefinition : JsonApiResourceDefinition { public ItemDefinition(IResourceGraph resourceGraph) : base(resourceGraph) diff --git a/docs/usage/extensibility/services.md b/docs/usage/extensibility/services.md index 90dea1352b..53d01e0186 100644 --- a/docs/usage/extensibility/services.md +++ b/docs/usage/extensibility/services.md @@ -12,7 +12,7 @@ In simple cases, you can also just wrap the base implementation with your custom A simple example would be to send notifications when a resource gets created. ```c# -public class TodoItemService : JsonApiResourceService +public class TodoItemService : JsonApiResourceService { private readonly INotificationService _notificationService; @@ -51,14 +51,14 @@ If you'd like to use another ORM that does not provide what JsonApiResourceServi // Program.cs // Add the service override for Product. -builder.Services.AddScoped, ProductService>(); +builder.Services.AddScoped, ProductService>(); // Add your own Data Access Object. builder.Services.AddScoped(); // ProductService.cs -public class ProductService : IResourceService +public class ProductService : IResourceService { private readonly IProductDao _dao; @@ -114,14 +114,14 @@ IResourceCommandService <|-- IRemoveFromRelationshipService In order to take advantage of these interfaces you first need to register the service for each implemented interface. ```c# -public class ArticleService : ICreateService, IDeleteService +public class ArticleService : ICreateService, IDeleteService { // ... } // Program.cs -builder.Services.AddScoped, ArticleService>(); -builder.Services.AddScoped, ArticleService>(); +builder.Services.AddScoped, ArticleService>(); +builder.Services.AddScoped, ArticleService>(); ``` In v3.0 we introduced an extension method that you can use to register a resource service on all of its JsonApiDotNetCore interfaces. @@ -140,7 +140,7 @@ Then on your model, pass in the set of endpoints to expose (the ones that you've ```c# [Resource(GenerateControllerEndpoints = JsonApiEndpoints.Create | JsonApiEndpoints.Delete)] -public class Article : Identifiable +public class Article : identifiable { // ... } @@ -149,11 +149,11 @@ public class Article : Identifiable Alternatively, when using a hand-written controller, you should inherit from the JSON:API controller and pass the services into the named, optional base parameters: ```c# -public class ArticlesController : JsonApiController +public class ArticlesController : JsonApiController { public ArticlesController(IJsonApiOptions options, IResourceGraph resourceGraph, - ILoggerFactory loggerFactory, ICreateService create, - IDeleteService delete) + ILoggerFactory loggerFactory, ICreateService create, + IDeleteService delete) : base(options, resourceGraph, loggerFactory, create: create, delete: delete) { } diff --git a/docs/usage/meta.md b/docs/usage/meta.md index 674d39413b..c4450a58de 100644 --- a/docs/usage/meta.md +++ b/docs/usage/meta.md @@ -47,7 +47,7 @@ Resource-specific metadata can be added by implementing `IResourceDefinition +public class PersonDefinition : JsonApiResourceDefinition { public PersonDefinition(IResourceGraph resourceGraph) : base(resourceGraph) diff --git a/docs/usage/options.md b/docs/usage/options.md index c78e9584e1..ec37f5b74f 100644 --- a/docs/usage/options.md +++ b/docs/usage/options.md @@ -137,7 +137,7 @@ options.ValidateModelState = true; ```c# #nullable enable -public class Person : Identifiable +public class Person : identifiable { [Attr] [MinLength(3)] diff --git a/docs/usage/resource-graph.md b/docs/usage/resource-graph.md index 046daaf7f5..d43e8cc506 100644 --- a/docs/usage/resource-graph.md +++ b/docs/usage/resource-graph.md @@ -54,7 +54,7 @@ You can manually construct the graph. ```c# // Program.cs builder.Services.AddJsonApi(resources: resourceGraphBuilder => - resourceGraphBuilder.Add()); + resourceGraphBuilder.Add()); ``` ## Resource Name @@ -66,14 +66,14 @@ The public resource name is exposed through the `type` member in the JSON:API pa // Program.cs builder.Services.AddJsonApi(resources: resourceGraphBuilder => { - resourceGraphBuilder.Add(publicName: "individuals"); + resourceGraphBuilder.Add(publicName: "individuals"); }); ``` 2. The `PublicName` property when a model is decorated with a `ResourceAttribute`. ```c# [Resource(PublicName = "individuals")] -public class Person : Identifiable +public class Person : identifiable { } ``` @@ -81,7 +81,7 @@ public class Person : Identifiable 3. The configured naming convention (by default this is camel-case), after pluralization. ```c# // this will be registered as "people" -public class Person : Identifiable +public class Person : identifiable { } ``` diff --git a/docs/usage/resources/attributes.md b/docs/usage/resources/attributes.md index 77c6ff9566..e1e444f34a 100644 --- a/docs/usage/resources/attributes.md +++ b/docs/usage/resources/attributes.md @@ -5,7 +5,7 @@ If you want an attribute on your model to be publicly available, add the `AttrAt ```c# #nullable enable -public class Person : Identifiable +public class Person : identifiable { [Attr] public string? FirstName { get; set; } @@ -24,7 +24,7 @@ There are two ways the exposed attribute name is determined: 2. Individually using the attribute's constructor. ```c# #nullable enable -public class Person : Identifiable +public class Person : identifiable { [Attr(PublicName = "first-name")] public string? FirstName { get; set; } @@ -51,7 +51,7 @@ Otherwise, the attribute is silently omitted. ```c# #nullable enable -public class User : Identifiable +public class User : identifiable { [Attr(Capabilities = ~AttrCapabilities.AllowView)] public string Password { get; set; } = null!; @@ -65,7 +65,7 @@ Indicates whether the attribute can be filtered on. When not allowed and used in ```c# #nullable enable -public class Person : Identifiable +public class Person : identifiable { [Attr(Capabilities = AttrCapabilities.AllowFilter)] public string? FirstName { get; set; } @@ -79,7 +79,7 @@ Indicates whether the attribute can be sorted on. When not allowed and used in ` ```c# #nullable enable -public class Person : Identifiable +public class Person : identifiable { [Attr(Capabilities = ~AttrCapabilities.AllowSort)] public string? FirstName { get; set; } @@ -93,7 +93,7 @@ Indicates whether POST requests can assign the attribute value. When sent but no ```c# #nullable enable -public class Person : Identifiable +public class Person : identifiable { [Attr(Capabilities = AttrCapabilities.AllowCreate)] public string? CreatorName { get; set; } @@ -107,7 +107,7 @@ Indicates whether PATCH requests can update the attribute value. When sent but n ```c# #nullable enable -public class Person : Identifiable +public class Person : identifiable { [Attr(Capabilities = AttrCapabilities.AllowChange)] public string? FirstName { get; set; }; @@ -124,7 +124,7 @@ You can also use [global options](~/usage/options.md#customize-serializer-option ```c# #nullable enable -public class Foo : Identifiable +public class Foo : identifiable { [Attr] public Bar? Bar { get; set; } @@ -146,7 +146,7 @@ and retrieval. ```c# #nullable enable -public class Foo : Identifiable +public class Foo : identifiable { [Attr] [NotMapped] diff --git a/docs/usage/resources/index.md b/docs/usage/resources/index.md index 09e0224c57..8c09112c09 100644 --- a/docs/usage/resources/index.md +++ b/docs/usage/resources/index.md @@ -14,11 +14,11 @@ public class Person : Identifiable If you need to attach annotations or attributes on the `Id` property, you can override the virtual property. ```c# -public class Person : Identifiable +public class Person : identifiable { [Key] [Column("PersonID")] - public override int Id { get; set; } + public override long Id { get; set; } } ``` diff --git a/docs/usage/resources/nullability.md b/docs/usage/resources/nullability.md index 875b133a01..03da284a02 100644 --- a/docs/usage/resources/nullability.md +++ b/docs/usage/resources/nullability.md @@ -12,7 +12,7 @@ To make JsonApiDotNetCore return an error when such a property is missing on res Example: ```c# -public sealed class User : Identifiable +public sealed class User : identifiable { [Attr] [Required] @@ -35,7 +35,7 @@ Example: ```c# #nullable disable -public sealed class Label : Identifiable +public sealed class Label : identifiable { [Attr] [Required] @@ -69,7 +69,7 @@ Example: ```c# #nullable enable -public sealed class Label : Identifiable +public sealed class Label : identifiable { [Attr] public string Name { get; set; } = null!; diff --git a/docs/usage/resources/relationships.md b/docs/usage/resources/relationships.md index b8c563e94e..a7bff0dfdb 100644 --- a/docs/usage/resources/relationships.md +++ b/docs/usage/resources/relationships.md @@ -13,7 +13,7 @@ This exposes a to-one relationship. ```c# #nullable enable -public class TodoItem : Identifiable +public class TodoItem : identifiable { [HasOne] public Person? Owner { get; set; } @@ -36,13 +36,13 @@ The next example defines that each car requires an engine, while an engine is op ```c# #nullable enable -public sealed class Car : Identifiable +public sealed class Car : identifiable { [HasOne] public Engine Engine { get; set; } = null!; } -public sealed class Engine : Identifiable +public sealed class Engine : identifiable { [HasOne] public Car? Car { get; set; } @@ -123,13 +123,13 @@ The next example defines that each car optionally has an engine, while an engine ```c# #nullable enable -public sealed class Car : Identifiable +public sealed class Car : identifiable { [HasOne] public Engine? Engine { get; set; } } -public sealed class Engine : Identifiable +public sealed class Engine : identifiable { [HasOne] public Car? Car { get; set; } @@ -204,7 +204,7 @@ CREATE UNIQUE INDEX "IX_Cars_EngineId" ON "Cars" ("EngineId"); This exposes a to-many relationship. ```c# -public class Person : Identifiable +public class Person : identifiable { [HasMany] public ICollection TodoItems { get; set; } = new HashSet(); @@ -236,7 +236,7 @@ However, under the covers it would use the join type and Entity Framework Core's ```c# #nullable disable -public class Article : Identifiable +public class Article : identifiable { // tells Entity Framework Core to ignore this property [NotMapped] @@ -261,7 +261,7 @@ There are two ways the exposed relationship name is determined: 2. Individually using the attribute's constructor. ```c# #nullable enable -public class TodoItem : Identifiable +public class TodoItem : identifiable { [HasOne(PublicName = "item-owner")] public Person Owner { get; set; } = null!; @@ -294,7 +294,7 @@ Otherwise, the relationship (and its related resources, when included) are silen ```c# #nullable enable -public class User : Identifiable +public class User : identifiable { [HasOne(Capabilities = ~HasOneCapabilities.AllowView)] public LoginAccount Account { get; set; } = null!; @@ -308,7 +308,7 @@ Indicates whether the relationship can be included. When not allowed and used in ```c# #nullable enable -public class User : Identifiable +public class User : identifiable { [HasMany(Capabilities = ~HasManyCapabilities.AllowInclude)] public ISet Groups { get; set; } = new HashSet(); @@ -322,7 +322,7 @@ For to-many relationships only. Indicates whether it can be used in the `count() ```c# #nullable enable -public class User : Identifiable +public class User : identifiable { [HasMany(Capabilities = HasManyCapabilities.AllowFilter)] public ISet Groups { get; set; } = new HashSet(); @@ -336,7 +336,7 @@ Indicates whether POST and PATCH requests can replace the relationship. When sen ```c# #nullable enable -public class User : Identifiable +public class User : identifiable { [HasOne(Capabilities = ~HasOneCapabilities.AllowSet)] public LoginAccount Account { get; set; } = null!; @@ -350,7 +350,7 @@ For to-many relationships only. Indicates whether POST requests can add resource ```c# #nullable enable -public class User : Identifiable +public class User : identifiable { [HasMany(Capabilities = ~HasManyCapabilities.AllowAdd)] public ISet Groups { get; set; } = new HashSet(); @@ -364,7 +364,7 @@ For to-many relationships only. Indicates whether DELETE requests can remove res ```c# #nullable enable -public class User : Identifiable +public class User : identifiable { [HasMany(Capabilities = ~HasManyCapabilities.AllowRemove)] public ISet Groups { get; set; } = new HashSet(); @@ -380,7 +380,7 @@ Relationships can be marked to disallow including them using the `?include=` que ```c# #nullable enable -public class TodoItem : Identifiable +public class TodoItem : identifiable { [HasOne(CanInclude: false)] public Person? Owner { get; set; } @@ -397,7 +397,7 @@ So for the calculated property to be evaluated correctly, the related entity mus ```c# #nullable enable -public class ShippingAddress : Identifiable +public class ShippingAddress : identifiable { [Attr] public string Street { get; set; } = null!; diff --git a/docs/usage/routing.md b/docs/usage/routing.md index cb1197e86a..2f6d6bed56 100644 --- a/docs/usage/routing.md +++ b/docs/usage/routing.md @@ -23,15 +23,15 @@ The library will configure routes for all auto-generated and hand-written contro ```c# // Auto-generated [Resource] -public class OrderSummary : Identifiable +public class OrderSummary : identifiable { } // Hand-written -public class OrderLineController : JsonApiController +public class OrderLineController : JsonApiController { public OrderLineController(IJsonApiOptions options, IResourceGraph resourceGraph, - ILoggerFactory loggerFactory, IResourceService resourceService) + ILoggerFactory loggerFactory, IResourceService resourceService) : base(options, resourceGraph, loggerFactory, resourceService) { } @@ -74,10 +74,10 @@ partial class OrderSummariesController // Hand-written [DisableRoutingConvention] [Route("custom/route/lines-in-order")] -public class OrderLineController : JsonApiController +public class OrderLineController : JsonApiController { public OrderLineController(IJsonApiOptions options, IResourceGraph resourceGraph, - ILoggerFactory loggerFactory, IResourceService resourceService) + ILoggerFactory loggerFactory, IResourceService resourceService) : base(options, resourceGraph, loggerFactory, resourceService) { } diff --git a/src/Examples/GettingStarted/Models/Book.cs b/src/Examples/GettingStarted/Models/Book.cs index 66beed1072..af4f857fdc 100644 --- a/src/Examples/GettingStarted/Models/Book.cs +++ b/src/Examples/GettingStarted/Models/Book.cs @@ -6,7 +6,7 @@ namespace GettingStarted.Models; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource] -public sealed class Book : Identifiable +public sealed class Book : Identifiable { [Attr] public string Title { get; set; } = null!; diff --git a/src/Examples/GettingStarted/Models/Person.cs b/src/Examples/GettingStarted/Models/Person.cs index 89ca4c5a69..c30b87a889 100644 --- a/src/Examples/GettingStarted/Models/Person.cs +++ b/src/Examples/GettingStarted/Models/Person.cs @@ -6,7 +6,7 @@ namespace GettingStarted.Models; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource] -public sealed class Person : Identifiable +public sealed class Person : Identifiable { [Attr] public string Name { get; set; } = null!; diff --git a/src/Examples/MultiDbContextExample/Models/ResourceA.cs b/src/Examples/MultiDbContextExample/Models/ResourceA.cs index 44a313a32f..1e5420db50 100644 --- a/src/Examples/MultiDbContextExample/Models/ResourceA.cs +++ b/src/Examples/MultiDbContextExample/Models/ResourceA.cs @@ -6,7 +6,7 @@ namespace MultiDbContextExample.Models; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource] -public sealed class ResourceA : Identifiable +public sealed class ResourceA : Identifiable { [Attr] public string? NameA { get; set; } diff --git a/src/Examples/MultiDbContextExample/Models/ResourceB.cs b/src/Examples/MultiDbContextExample/Models/ResourceB.cs index 3a6bc7316e..28cb9066c2 100644 --- a/src/Examples/MultiDbContextExample/Models/ResourceB.cs +++ b/src/Examples/MultiDbContextExample/Models/ResourceB.cs @@ -6,7 +6,7 @@ namespace MultiDbContextExample.Models; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource] -public sealed class ResourceB : Identifiable +public sealed class ResourceB : Identifiable { [Attr] public string? NameB { get; set; } diff --git a/src/Examples/MultiDbContextExample/Repositories/DbContextARepository.cs b/src/Examples/MultiDbContextExample/Repositories/DbContextARepository.cs index d90b572004..e384729a68 100644 --- a/src/Examples/MultiDbContextExample/Repositories/DbContextARepository.cs +++ b/src/Examples/MultiDbContextExample/Repositories/DbContextARepository.cs @@ -11,6 +11,6 @@ namespace MultiDbContextExample.Repositories; public sealed class DbContextARepository( ITargetedFields targetedFields, DbContextResolver dbContextResolver, IResourceGraph resourceGraph, IResourceFactory resourceFactory, IEnumerable constraintProviders, ILoggerFactory loggerFactory, IResourceDefinitionAccessor resourceDefinitionAccessor) - : EntityFrameworkCoreRepository(targetedFields, dbContextResolver, resourceGraph, resourceFactory, constraintProviders, loggerFactory, + : EntityFrameworkCoreRepository(targetedFields, dbContextResolver, resourceGraph, resourceFactory, constraintProviders, loggerFactory, resourceDefinitionAccessor) - where TResource : class, IIdentifiable; + where TResource : class, IIdentifiable; diff --git a/src/Examples/MultiDbContextExample/Repositories/DbContextBRepository.cs b/src/Examples/MultiDbContextExample/Repositories/DbContextBRepository.cs index ed56237d56..dae26157de 100644 --- a/src/Examples/MultiDbContextExample/Repositories/DbContextBRepository.cs +++ b/src/Examples/MultiDbContextExample/Repositories/DbContextBRepository.cs @@ -11,6 +11,6 @@ namespace MultiDbContextExample.Repositories; public sealed class DbContextBRepository( ITargetedFields targetedFields, DbContextResolver dbContextResolver, IResourceGraph resourceGraph, IResourceFactory resourceFactory, IEnumerable constraintProviders, ILoggerFactory loggerFactory, IResourceDefinitionAccessor resourceDefinitionAccessor) - : EntityFrameworkCoreRepository(targetedFields, dbContextResolver, resourceGraph, resourceFactory, constraintProviders, loggerFactory, + : EntityFrameworkCoreRepository(targetedFields, dbContextResolver, resourceGraph, resourceFactory, constraintProviders, loggerFactory, resourceDefinitionAccessor) - where TResource : class, IIdentifiable; + where TResource : class, IIdentifiable; diff --git a/src/Examples/ReportsExample/Models/Report.cs b/src/Examples/ReportsExample/Models/Report.cs index 5344025d2e..e05f8e61a1 100644 --- a/src/Examples/ReportsExample/Models/Report.cs +++ b/src/Examples/ReportsExample/Models/Report.cs @@ -7,7 +7,7 @@ namespace ReportsExample.Models; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(GenerateControllerEndpoints = JsonApiEndpoints.GetCollection)] -public sealed class Report : Identifiable +public sealed class Report : Identifiable { [Attr] public string Title { get; set; } = null!; diff --git a/src/Examples/ReportsExample/Services/ReportService.cs b/src/Examples/ReportsExample/Services/ReportService.cs index 62bb7c9554..90a22bb7ea 100644 --- a/src/Examples/ReportsExample/Services/ReportService.cs +++ b/src/Examples/ReportsExample/Services/ReportService.cs @@ -5,7 +5,7 @@ namespace ReportsExample.Services; [UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSignature)] -public class ReportService : IGetAllService +public class ReportService : IGetAllService { public Task> GetAsync(CancellationToken cancellationToken) { diff --git a/test/DiscoveryTests/LoggingTests.cs b/test/DiscoveryTests/LoggingTests.cs index 9afb7c7888..d3c1a2f858 100644 --- a/test/DiscoveryTests/LoggingTests.cs +++ b/test/DiscoveryTests/LoggingTests.cs @@ -32,7 +32,7 @@ public async Task Logs_message_to_add_NuGet_reference() var resourceGraph = app.Services.GetRequiredService(); ResourceType resourceType = resourceGraph.GetResourceType(); - var repository = app.Services.GetRequiredService>(); + var repository = app.Services.GetRequiredService>(); // Act _ = await repository.GetAsync(new QueryLayer(resourceType), CancellationToken.None); diff --git a/test/DiscoveryTests/PrivateResource.cs b/test/DiscoveryTests/PrivateResource.cs index 9ad2daef51..d12411adc2 100644 --- a/test/DiscoveryTests/PrivateResource.cs +++ b/test/DiscoveryTests/PrivateResource.cs @@ -6,4 +6,4 @@ namespace DiscoveryTests; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource] -public sealed class PrivateResource : Identifiable; +public sealed class PrivateResource : Identifiable; diff --git a/test/DiscoveryTests/PrivateResourceDefinition.cs b/test/DiscoveryTests/PrivateResourceDefinition.cs index 3003ce389c..e699a20db5 100644 --- a/test/DiscoveryTests/PrivateResourceDefinition.cs +++ b/test/DiscoveryTests/PrivateResourceDefinition.cs @@ -6,4 +6,4 @@ namespace DiscoveryTests; [UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSignature)] public sealed class PrivateResourceDefinition(IResourceGraph resourceGraph) - : JsonApiResourceDefinition(resourceGraph); + : JsonApiResourceDefinition(resourceGraph); diff --git a/test/DiscoveryTests/PrivateResourceRepository.cs b/test/DiscoveryTests/PrivateResourceRepository.cs index eb33d18440..836ed5ac7f 100644 --- a/test/DiscoveryTests/PrivateResourceRepository.cs +++ b/test/DiscoveryTests/PrivateResourceRepository.cs @@ -11,5 +11,5 @@ namespace DiscoveryTests; public sealed class PrivateResourceRepository( ITargetedFields targetedFields, IDbContextResolver dbContextResolver, IResourceGraph resourceGraph, IResourceFactory resourceFactory, IEnumerable constraintProviders, ILoggerFactory loggerFactory, IResourceDefinitionAccessor resourceDefinitionAccessor) - : EntityFrameworkCoreRepository(targetedFields, dbContextResolver, resourceGraph, resourceFactory, constraintProviders, loggerFactory, - resourceDefinitionAccessor); + : EntityFrameworkCoreRepository(targetedFields, dbContextResolver, resourceGraph, resourceFactory, constraintProviders, + loggerFactory, resourceDefinitionAccessor); diff --git a/test/DiscoveryTests/PrivateResourceService.cs b/test/DiscoveryTests/PrivateResourceService.cs index bad4b41428..79bdd3c03e 100644 --- a/test/DiscoveryTests/PrivateResourceService.cs +++ b/test/DiscoveryTests/PrivateResourceService.cs @@ -14,5 +14,5 @@ public sealed class PrivateResourceService( IResourceRepositoryAccessor repositoryAccessor, IQueryLayerComposer queryLayerComposer, IPaginationContext paginationContext, IJsonApiOptions options, ILoggerFactory loggerFactory, IJsonApiRequest request, IResourceChangeTracker resourceChangeTracker, IResourceDefinitionAccessor resourceDefinitionAccessor) - : JsonApiResourceService(repositoryAccessor, queryLayerComposer, paginationContext, options, loggerFactory, request, + : JsonApiResourceService(repositoryAccessor, queryLayerComposer, paginationContext, options, loggerFactory, request, resourceChangeTracker, resourceDefinitionAccessor); diff --git a/test/DiscoveryTests/ServiceDiscoveryFacadeTests.cs b/test/DiscoveryTests/ServiceDiscoveryFacadeTests.cs index eeca3cdb89..0b1fa3a8d3 100644 --- a/test/DiscoveryTests/ServiceDiscoveryFacadeTests.cs +++ b/test/DiscoveryTests/ServiceDiscoveryFacadeTests.cs @@ -70,7 +70,7 @@ public void Can_add_resource_service_from_current_assembly_to_container() // Assert ServiceProvider serviceProvider = _services.BuildServiceProvider(); - var resourceService = serviceProvider.GetRequiredService>(); + var resourceService = serviceProvider.GetRequiredService>(); resourceService.Should().BeOfType(); } @@ -86,7 +86,7 @@ public void Can_add_resource_repository_from_current_assembly_to_container() // Assert ServiceProvider serviceProvider = _services.BuildServiceProvider(); - var resourceRepository = serviceProvider.GetRequiredService>(); + var resourceRepository = serviceProvider.GetRequiredService>(); resourceRepository.Should().BeOfType(); } @@ -102,7 +102,7 @@ public void Can_add_resource_definition_from_current_assembly_to_container() // Assert ServiceProvider serviceProvider = _services.BuildServiceProvider(); - var resourceDefinition = serviceProvider.GetRequiredService>(); + var resourceDefinition = serviceProvider.GetRequiredService>(); resourceDefinition.Should().BeOfType(); } diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/Archiving/BroadcastComment.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/Archiving/BroadcastComment.cs index b7ed37341f..e76da97f29 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/Archiving/BroadcastComment.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/Archiving/BroadcastComment.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.Archiving; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.Archiving")] -public sealed class BroadcastComment : Identifiable +public sealed class BroadcastComment : Identifiable { [Attr] public string Text { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/Archiving/TelevisionBroadcast.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/Archiving/TelevisionBroadcast.cs index c6c6dc2a44..8476036013 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/Archiving/TelevisionBroadcast.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/Archiving/TelevisionBroadcast.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.Archiving; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.Archiving")] -public sealed class TelevisionBroadcast : Identifiable +public sealed class TelevisionBroadcast : Identifiable { [Attr] public string Title { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/Archiving/TelevisionBroadcastDefinition.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/Archiving/TelevisionBroadcastDefinition.cs index 5ec385081b..ce7cc11c27 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/Archiving/TelevisionBroadcastDefinition.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/Archiving/TelevisionBroadcastDefinition.cs @@ -15,7 +15,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.Archiving; [UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSignature)] public sealed class TelevisionBroadcastDefinition( IResourceGraph resourceGraph, TelevisionDbContext dbContext, IJsonApiRequest request, IEnumerable constraintProviders) - : JsonApiResourceDefinition(resourceGraph) + : JsonApiResourceDefinition(resourceGraph) { private readonly TelevisionDbContext _dbContext = dbContext; private readonly IJsonApiRequest _request = request; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/Archiving/TelevisionNetwork.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/Archiving/TelevisionNetwork.cs index cf6404f039..cbbe3219cc 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/Archiving/TelevisionNetwork.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/Archiving/TelevisionNetwork.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.Archiving; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.Archiving")] -public sealed class TelevisionNetwork : Identifiable +public sealed class TelevisionNetwork : Identifiable { [Attr] public string Name { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/Archiving/TelevisionStation.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/Archiving/TelevisionStation.cs index 47000c5733..1bfab54405 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/Archiving/TelevisionStation.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/Archiving/TelevisionStation.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.Archiving; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.Archiving")] -public sealed class TelevisionStation : Identifiable +public sealed class TelevisionStation : Identifiable { [Attr] public string Name { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/CompositeKeys/CompositeKeyTests.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/CompositeKeys/CompositeKeyTests.cs index 3ea92e7c17..18fef1f56e 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/CompositeKeys/CompositeKeyTests.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/CompositeKeys/CompositeKeyTests.cs @@ -24,7 +24,7 @@ public CompositeKeyTests(IntegrationTestContext { services.AddResourceRepository>(); - services.AddResourceRepository>(); + services.AddResourceRepository>(); }); } diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/CompositeKeys/Dealership.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/CompositeKeys/Dealership.cs index 091e7acbe1..c8574b320e 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/CompositeKeys/Dealership.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/CompositeKeys/Dealership.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.CompositeKeys; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.CompositeKeys")] -public sealed class Dealership : Identifiable +public sealed class Dealership : Identifiable { [Attr] public string Address { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/CompositeKeys/Engine.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/CompositeKeys/Engine.cs index 56421610aa..428b65fbb7 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/CompositeKeys/Engine.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/CompositeKeys/Engine.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.CompositeKeys; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.CompositeKeys")] -public sealed class Engine : Identifiable +public sealed class Engine : Identifiable { [Attr] public string SerialCode { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/ContentNegotiation/Policy.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/ContentNegotiation/Policy.cs index ab2339e9fd..745b137069 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/ContentNegotiation/Policy.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/ContentNegotiation/Policy.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.ContentNegotiation; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.ContentNegotiation")] -public sealed class Policy : Identifiable +public sealed class Policy : Identifiable { [Attr] public string Name { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/ControllerActionResults/Toothbrush.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/ControllerActionResults/Toothbrush.cs index 4e6769756a..8809768d50 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/ControllerActionResults/Toothbrush.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/ControllerActionResults/Toothbrush.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.ControllerActionResults; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.ControllerActionResults")] -public sealed class Toothbrush : Identifiable +public sealed class Toothbrush : Identifiable { [Attr] public bool IsElectric { get; set; } diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/ControllerActionResults/ToothbrushesController.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/ControllerActionResults/ToothbrushesController.cs index 5d8793b453..ab9068d6d1 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/ControllerActionResults/ToothbrushesController.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/ControllerActionResults/ToothbrushesController.cs @@ -13,7 +13,7 @@ partial class ToothbrushesController internal const int ObjectResultWithErrorCollectionId = 55555555; [HttpGet("{id}")] - public override async Task GetAsync(int id, CancellationToken cancellationToken) + public override async Task GetAsync(long id, CancellationToken cancellationToken) { if (id == EmptyActionResultId) { diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/CustomRoutes/Civilian.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/CustomRoutes/Civilian.cs index 00baaaa16c..bd8d401fcb 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/CustomRoutes/Civilian.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/CustomRoutes/Civilian.cs @@ -7,7 +7,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.CustomRoutes; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.CustomRoutes")] -public sealed class Civilian : Identifiable +public sealed class Civilian : Identifiable { [Attr] public string Name { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/CustomRoutes/Town.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/CustomRoutes/Town.cs index bbb7e6909a..5ef7dee922 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/CustomRoutes/Town.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/CustomRoutes/Town.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.CustomRoutes; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.CustomRoutes")] -public sealed class Town : Identifiable +public sealed class Town : Identifiable { [Attr] public string Name { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/CustomRoutes/TownsController.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/CustomRoutes/TownsController.cs index f99f3aa225..9941a8a65c 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/CustomRoutes/TownsController.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/CustomRoutes/TownsController.cs @@ -15,7 +15,7 @@ partial class TownsController private readonly CustomRouteDbContext _dbContext; [ActivatorUtilitiesConstructor] - public TownsController(IJsonApiOptions options, IResourceGraph resourceGraph, ILoggerFactory loggerFactory, IResourceService resourceService, + public TownsController(IJsonApiOptions options, IResourceGraph resourceGraph, ILoggerFactory loggerFactory, IResourceService resourceService, CustomRouteDbContext dbContext) : base(options, resourceGraph, loggerFactory, resourceService) { diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/Building.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/Building.cs index 3e66be191c..84cce7149c 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/Building.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/Building.cs @@ -7,7 +7,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.EagerLoading; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.EagerLoading")] -public sealed class Building : Identifiable +public sealed class Building : Identifiable { [Attr] public string Number { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/BuildingDefinition.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/BuildingDefinition.cs index dbdfea8a6f..23b393ef00 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/BuildingDefinition.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/BuildingDefinition.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.EagerLoading; [UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSignature)] -public sealed class BuildingDefinition : JsonApiResourceDefinition +public sealed class BuildingDefinition : JsonApiResourceDefinition { private readonly IJsonApiRequest _request; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/BuildingRepository.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/BuildingRepository.cs index 8f6d59c7b1..2dfb1fd1e6 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/BuildingRepository.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/BuildingRepository.cs @@ -11,10 +11,10 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.EagerLoading; public sealed class BuildingRepository( ITargetedFields targetedFields, IDbContextResolver dbContextResolver, IResourceGraph resourceGraph, IResourceFactory resourceFactory, IEnumerable constraintProviders, ILoggerFactory loggerFactory, IResourceDefinitionAccessor resourceDefinitionAccessor) - : EntityFrameworkCoreRepository(targetedFields, dbContextResolver, resourceGraph, resourceFactory, constraintProviders, loggerFactory, + : EntityFrameworkCoreRepository(targetedFields, dbContextResolver, resourceGraph, resourceFactory, constraintProviders, loggerFactory, resourceDefinitionAccessor) { - public override async Task GetForCreateAsync(Type resourceClrType, int id, CancellationToken cancellationToken) + public override async Task GetForCreateAsync(Type resourceClrType, long id, CancellationToken cancellationToken) { Building building = await base.GetForCreateAsync(resourceClrType, id, cancellationToken); diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/City.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/City.cs index 66e8dacb2c..03ab50c832 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/City.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/City.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.EagerLoading; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.EagerLoading")] -public sealed class City : Identifiable +public sealed class City : Identifiable { [Attr] public string Name { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/EagerLoadingTests.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/EagerLoadingTests.cs index 8b64dfcbbf..53be794429 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/EagerLoadingTests.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/EagerLoadingTests.cs @@ -240,7 +240,7 @@ public async Task Can_create_resource() responseDocument.Data.SingleValue.Attributes.Should().ContainKey("primaryDoorColor").WhoseValue.Should().Be("(unspecified)"); responseDocument.Data.SingleValue.Attributes.Should().ContainKey("secondaryDoorColor").WhoseValue.Should().BeNull(); - int newBuildingId = int.Parse(responseDocument.Data.SingleValue.Id.Should().NotBeNull().And.Subject); + long newBuildingId = long.Parse(responseDocument.Data.SingleValue.Id.Should().NotBeNull().And.Subject); await _testContext.RunOnDatabaseAsync(async dbContext => { diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/State.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/State.cs index 6f41815618..190c745988 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/State.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/State.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.EagerLoading; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.EagerLoading")] -public sealed class State : Identifiable +public sealed class State : Identifiable { [Attr] public string Name { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/Street.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/Street.cs index 263bb6cfd4..05673ec5d9 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/Street.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/EagerLoading/Street.cs @@ -7,7 +7,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.EagerLoading; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.EagerLoading")] -public sealed class Street : Identifiable +public sealed class Street : Identifiable { [Attr] public string Name { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/ExceptionHandling/ConsumerArticle.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/ExceptionHandling/ConsumerArticle.cs index c508e7aa17..64ba92a917 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/ExceptionHandling/ConsumerArticle.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/ExceptionHandling/ConsumerArticle.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.ExceptionHandling; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.ExceptionHandling")] -public sealed class ConsumerArticle : Identifiable +public sealed class ConsumerArticle : Identifiable { [Attr] public string Code { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/ExceptionHandling/ConsumerArticleService.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/ExceptionHandling/ConsumerArticleService.cs index 9c2a9fde48..18e4920d5c 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/ExceptionHandling/ConsumerArticleService.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/ExceptionHandling/ConsumerArticleService.cs @@ -14,13 +14,13 @@ public sealed class ConsumerArticleService( IResourceRepositoryAccessor repositoryAccessor, IQueryLayerComposer queryLayerComposer, IPaginationContext paginationContext, IJsonApiOptions options, ILoggerFactory loggerFactory, IJsonApiRequest request, IResourceChangeTracker resourceChangeTracker, IResourceDefinitionAccessor resourceDefinitionAccessor) - : JsonApiResourceService(repositoryAccessor, queryLayerComposer, paginationContext, options, loggerFactory, request, + : JsonApiResourceService(repositoryAccessor, queryLayerComposer, paginationContext, options, loggerFactory, request, resourceChangeTracker, resourceDefinitionAccessor) { private const string SupportEmailAddress = "company@email.com"; internal const string UnavailableArticlePrefix = "X"; - public override async Task GetAsync(int id, CancellationToken cancellationToken) + public override async Task GetAsync(long id, CancellationToken cancellationToken) { ConsumerArticle consumerArticle = await base.GetAsync(id, cancellationToken); diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/ExceptionHandling/ThrowingArticle.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/ExceptionHandling/ThrowingArticle.cs index ae63c0f158..aa3be618d4 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/ExceptionHandling/ThrowingArticle.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/ExceptionHandling/ThrowingArticle.cs @@ -7,7 +7,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.ExceptionHandling; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.ExceptionHandling")] -public sealed class ThrowingArticle : Identifiable +public sealed class ThrowingArticle : Identifiable { [Attr] [NotMapped] diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/HostingInIIS/ArtGallery.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/HostingInIIS/ArtGallery.cs index f73865f589..7331130cf2 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/HostingInIIS/ArtGallery.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/HostingInIIS/ArtGallery.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.HostingInIIS; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.HostingInIIS")] -public sealed class ArtGallery : Identifiable +public sealed class ArtGallery : Identifiable { [Attr] public string Theme { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/HostingInIIS/Painting.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/HostingInIIS/Painting.cs index 97c04ac55e..0053dc9c2b 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/HostingInIIS/Painting.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/HostingInIIS/Painting.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.HostingInIIS; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.HostingInIIS")] -public sealed class Painting : Identifiable +public sealed class Painting : Identifiable { [Attr] public string Title { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/InputValidation/ModelState/SystemFile.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/InputValidation/ModelState/SystemFile.cs index ef90adcc79..d2845cca84 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/InputValidation/ModelState/SystemFile.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/InputValidation/ModelState/SystemFile.cs @@ -7,7 +7,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.InputValidation.ModelState; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.InputValidation.ModelState")] -public sealed class SystemFile : Identifiable +public sealed class SystemFile : Identifiable { [Attr] [MinLength(1)] diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/InputValidation/ModelState/SystemVolume.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/InputValidation/ModelState/SystemVolume.cs index 08e4e58937..b283b551b1 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/InputValidation/ModelState/SystemVolume.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/InputValidation/ModelState/SystemVolume.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.InputValidation.ModelState; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.InputValidation.ModelState")] -public sealed class SystemVolume : Identifiable +public sealed class SystemVolume : Identifiable { [Attr] public string? Name { get; set; } diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/Links/PhotoLocation.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/Links/PhotoLocation.cs index ddd1489cbe..092851fbdd 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/Links/PhotoLocation.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/Links/PhotoLocation.cs @@ -7,7 +7,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.Links; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [ResourceLinks(TopLevelLinks = LinkTypes.None, ResourceLinks = LinkTypes.None, RelationshipLinks = LinkTypes.Related)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.Links")] -public sealed class PhotoLocation : Identifiable +public sealed class PhotoLocation : Identifiable { [Attr] public string? PlaceName { get; set; } diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/Logging/AuditEntry.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/Logging/AuditEntry.cs index cbd1dd0989..827a8cf472 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/Logging/AuditEntry.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/Logging/AuditEntry.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.Logging; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.Logging")] -public sealed class AuditEntry : Identifiable +public sealed class AuditEntry : Identifiable { [Attr] public string UserName { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/Meta/ProductFamily.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/Meta/ProductFamily.cs index f860972abe..bb72fd5392 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/Meta/ProductFamily.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/Meta/ProductFamily.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.Meta; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.Meta")] -public sealed class ProductFamily : Identifiable +public sealed class ProductFamily : Identifiable { [Attr] public string Name { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/Meta/SupportTicket.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/Meta/SupportTicket.cs index 9ce245e951..b04c0ec2ab 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/Meta/SupportTicket.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/Meta/SupportTicket.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.Meta; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.Meta")] -public sealed class SupportTicket : Identifiable +public sealed class SupportTicket : Identifiable { [Attr] public string Description { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/Meta/SupportTicketDefinition.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/Meta/SupportTicketDefinition.cs index 20e5078bfe..446711c429 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/Meta/SupportTicketDefinition.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/Meta/SupportTicketDefinition.cs @@ -5,7 +5,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.Meta; [UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSignature)] public sealed class SupportTicketDefinition(IResourceGraph resourceGraph, ResourceDefinitionHitCounter hitCounter) - : HitCountingResourceDefinition(resourceGraph, hitCounter) + : HitCountingResourceDefinition(resourceGraph, hitCounter) { protected override ResourceDefinitionExtensibilityPoints ExtensibilityPointsToTrack => ResourceDefinitionExtensibilityPoints.GetMeta; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/MultiTenancy/MultiTenancyTests.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/MultiTenancy/MultiTenancyTests.cs index cca888a7a1..01f23e3c8e 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/MultiTenancy/MultiTenancyTests.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/MultiTenancy/MultiTenancyTests.cs @@ -27,8 +27,8 @@ public MultiTenancyTests(IntegrationTestContext { - services.AddResourceService>(); - services.AddResourceService>(); + services.AddResourceService>(); + services.AddResourceService>(); services.AddSingleton(); services.AddScoped(); @@ -310,7 +310,7 @@ public async Task Can_create_resource() responseDocument.Data.SingleValue.Attributes.Should().ContainKey("url").WhoseValue.Should().Be(newShopUrl); responseDocument.Data.SingleValue.Relationships.Should().NotBeNull(); - int newShopId = int.Parse(responseDocument.Data.SingleValue.Id.Should().NotBeNull().And.Subject); + long newShopId = long.Parse(responseDocument.Data.SingleValue.Id.Should().NotBeNull().And.Subject); await _testContext.RunOnDatabaseAsync(async dbContext => { diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/MultiTenancy/WebProduct.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/MultiTenancy/WebProduct.cs index 8bdf4bfb18..a2c41c5ede 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/MultiTenancy/WebProduct.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/MultiTenancy/WebProduct.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.MultiTenancy; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.MultiTenancy")] -public sealed class WebProduct : Identifiable +public sealed class WebProduct : Identifiable { [Attr] public string Name { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/MultiTenancy/WebShop.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/MultiTenancy/WebShop.cs index 5c06148ee5..f191344fcc 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/MultiTenancy/WebShop.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/MultiTenancy/WebShop.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.MultiTenancy; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.MultiTenancy")] -public sealed class WebShop : Identifiable, IHasTenant +public sealed class WebShop : Identifiable, IHasTenant { [Attr] public string Url { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/DivingBoard.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/DivingBoard.cs index b1df54874f..44ef3c9ffe 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/DivingBoard.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/DivingBoard.cs @@ -8,7 +8,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.NamingConventions; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(GenerateControllerEndpoints = JsonApiEndpoints.None)] -public sealed class DivingBoard : Identifiable +public sealed class DivingBoard : Identifiable { [Attr] [Range(1, 20)] diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/DivingBoardsController.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/DivingBoardsController.cs index 3c02f9d8e2..1195fedfc6 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/DivingBoardsController.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/DivingBoardsController.cs @@ -6,5 +6,5 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.NamingConventions; public sealed class DivingBoardsController( - IJsonApiOptions options, IResourceGraph resourceGraph, ILoggerFactory loggerFactory, IResourceService resourceService) - : JsonApiController(options, resourceGraph, loggerFactory, resourceService); + IJsonApiOptions options, IResourceGraph resourceGraph, ILoggerFactory loggerFactory, IResourceService resourceService) + : JsonApiController(options, resourceGraph, loggerFactory, resourceService); diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/KebabCasingTests.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/KebabCasingTests.cs index afa1bdfcd0..45e6ddf125 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/KebabCasingTests.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/KebabCasingTests.cs @@ -120,7 +120,7 @@ public async Task Can_create_resource() responseDocument.Data.SingleValue.Type.Should().Be("swimming-pools"); responseDocument.Data.SingleValue.Attributes.Should().ContainKey("is-indoor").WhoseValue.Should().Be(newPool.IsIndoor); - int newPoolId = int.Parse(responseDocument.Data.SingleValue.Id.Should().NotBeNull().And.Subject); + long newPoolId = long.Parse(responseDocument.Data.SingleValue.Id.Should().NotBeNull().And.Subject); string poolLink = $"{route}/{newPoolId}"; responseDocument.Data.SingleValue.Relationships.Should().ContainKey("water-slides").WhoseValue.With(value => diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/PascalCasingTests.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/PascalCasingTests.cs index 9da9e4e520..d468c11391 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/PascalCasingTests.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/PascalCasingTests.cs @@ -119,7 +119,7 @@ public async Task Can_create_resource() responseDocument.Data.SingleValue.Type.Should().Be("SwimmingPools"); responseDocument.Data.SingleValue.Attributes.Should().ContainKey("IsIndoor").WhoseValue.Should().Be(newPool.IsIndoor); - int newPoolId = int.Parse(responseDocument.Data.SingleValue.Id.Should().NotBeNull().And.Subject); + long newPoolId = long.Parse(responseDocument.Data.SingleValue.Id.Should().NotBeNull().And.Subject); string poolLink = $"{route}/{newPoolId}"; responseDocument.Data.SingleValue.Relationships.Should().ContainKey("WaterSlides").WhoseValue.With(value => diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/SwimmingPool.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/SwimmingPool.cs index ce786ff839..d740902587 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/SwimmingPool.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/SwimmingPool.cs @@ -7,7 +7,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.NamingConventions; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(GenerateControllerEndpoints = JsonApiEndpoints.None)] -public sealed class SwimmingPool : Identifiable +public sealed class SwimmingPool : Identifiable { [Attr] public bool IsIndoor { get; set; } diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/SwimmingPoolsController.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/SwimmingPoolsController.cs index 95c368fb0e..3dd10cc98e 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/SwimmingPoolsController.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/SwimmingPoolsController.cs @@ -6,5 +6,5 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.NamingConventions; public sealed class SwimmingPoolsController( - IJsonApiOptions options, IResourceGraph resourceGraph, ILoggerFactory loggerFactory, IResourceService resourceService) - : JsonApiController(options, resourceGraph, loggerFactory, resourceService); + IJsonApiOptions options, IResourceGraph resourceGraph, ILoggerFactory loggerFactory, IResourceService resourceService) + : JsonApiController(options, resourceGraph, loggerFactory, resourceService); diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/WaterSlide.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/WaterSlide.cs index 9dbd17662e..d4c917b472 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/WaterSlide.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/NamingConventions/WaterSlide.cs @@ -7,7 +7,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.NamingConventions; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(GenerateControllerEndpoints = JsonApiEndpoints.None)] -public sealed class WaterSlide : Identifiable +public sealed class WaterSlide : Identifiable { [Attr] public decimal LengthInMeters { get; set; } diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/NonJsonApiControllers/DuplicateKnownResourcesController.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/NonJsonApiControllers/DuplicateKnownResourcesController.cs index 34a9d1d674..677547295e 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/NonJsonApiControllers/DuplicateKnownResourcesController.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/NonJsonApiControllers/DuplicateKnownResourcesController.cs @@ -6,5 +6,5 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.NonJsonApiControllers; public sealed class DuplicateKnownResourcesController( - IJsonApiOptions options, IResourceGraph resourceGraph, ILoggerFactory loggerFactory, IResourceService resourceService) - : JsonApiController(options, resourceGraph, loggerFactory, resourceService); + IJsonApiOptions options, IResourceGraph resourceGraph, ILoggerFactory loggerFactory, IResourceService resourceService) + : JsonApiController(options, resourceGraph, loggerFactory, resourceService); diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/NonJsonApiControllers/KnownResource.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/NonJsonApiControllers/KnownResource.cs index a5a25efbb0..e8dde99643 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/NonJsonApiControllers/KnownResource.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/NonJsonApiControllers/KnownResource.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.NonJsonApiControllers; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.NonJsonApiControllers")] -public sealed class KnownResource : Identifiable +public sealed class KnownResource : Identifiable { [Attr] public string? Value { get; set; } diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/NonJsonApiControllers/UnknownResource.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/NonJsonApiControllers/UnknownResource.cs index d7d27464fd..db47895ecb 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/NonJsonApiControllers/UnknownResource.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/NonJsonApiControllers/UnknownResource.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.NonJsonApiControllers; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.NonJsonApiControllers")] -public sealed class UnknownResource : Identifiable +public sealed class UnknownResource : Identifiable { public string? Value { get; set; } } diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/AccountPreferences.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/AccountPreferences.cs index 5b00f1bb0c..1ebc99e452 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/AccountPreferences.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/AccountPreferences.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.QueryStrings; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.QueryStrings")] -public sealed class AccountPreferences : Identifiable +public sealed class AccountPreferences : Identifiable { [Attr] public bool UseDarkTheme { get; set; } diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Appointment.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Appointment.cs index 41a05b13f6..ba3ea783df 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Appointment.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Appointment.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.QueryStrings; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.QueryStrings")] -public sealed class Appointment : Identifiable +public sealed class Appointment : Identifiable { [Attr] public string Title { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Blog.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Blog.cs index 1ad9f4b526..b58c446ced 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Blog.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Blog.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.QueryStrings; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.QueryStrings")] -public sealed class Blog : Identifiable +public sealed class Blog : Identifiable { [Attr] public string Title { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/BlogPost.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/BlogPost.cs index 1840f5674d..f0382f90a4 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/BlogPost.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/BlogPost.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.QueryStrings; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.QueryStrings")] -public sealed class BlogPost : Identifiable +public sealed class BlogPost : Identifiable { [Attr] public string Caption { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Calendar.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Calendar.cs index eaf091ec07..2861d35f23 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Calendar.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Calendar.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.QueryStrings; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.QueryStrings")] -public sealed class Calendar : Identifiable +public sealed class Calendar : Identifiable { [Attr] public string? TimeZone { get; set; } diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Comment.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Comment.cs index 84360c8862..2e78f4e999 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Comment.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Comment.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.QueryStrings; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.QueryStrings")] -public sealed class Comment : Identifiable +public sealed class Comment : Identifiable { [Attr] public string Text { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Filtering/FilterableResource.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Filtering/FilterableResource.cs index 6a8ddc688f..f1023cef10 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Filtering/FilterableResource.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Filtering/FilterableResource.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.QueryStrings.Filtering; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.QueryStrings.Filtering")] -public sealed class FilterableResource : Identifiable +public sealed class FilterableResource : Identifiable { [Attr] public string SomeString { get; set; } = string.Empty; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Human.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Human.cs index 4754f841a8..1e2c01d73b 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Human.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Human.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.QueryStrings; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.QueryStrings")] -public abstract class Human : Identifiable +public abstract class Human : Identifiable { [Attr] public string Name { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Includes/DisablePaginationOnRelationshipTests.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Includes/DisablePaginationOnRelationshipTests.cs index 219d1a58eb..81ffa97244 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Includes/DisablePaginationOnRelationshipTests.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Includes/DisablePaginationOnRelationshipTests.cs @@ -218,7 +218,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => [UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSignature)] private sealed class ReminderDefinition(PaginationToggle paginationToggle, IResourceGraph resourceGraph) - : JsonApiResourceDefinition(resourceGraph) + : JsonApiResourceDefinition(resourceGraph) { private readonly PaginationToggle _paginationToggle = paginationToggle; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Label.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Label.cs index 07804aeac6..9b22c051cf 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Label.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Label.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.QueryStrings; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.QueryStrings")] -public sealed class Label : Identifiable +public sealed class Label : Identifiable { [Attr] public string Name { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/LoginAttempt.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/LoginAttempt.cs index 007182781a..34398875dc 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/LoginAttempt.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/LoginAttempt.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.QueryStrings; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.QueryStrings")] -public sealed class LoginAttempt : Identifiable +public sealed class LoginAttempt : Identifiable { [Attr] public DateTimeOffset TriedAt { get; set; } diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Reminder.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Reminder.cs index 34759f50de..79b892a229 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Reminder.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/Reminder.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.QueryStrings; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.QueryStrings")] -public sealed class Reminder : Identifiable +public sealed class Reminder : Identifiable { [Attr] public DateTime RemindsAt { get; set; } diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/SparseFieldSets/SparseFieldSetTests.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/SparseFieldSets/SparseFieldSetTests.cs index 088c6cc7bf..1fdcf6465d 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/SparseFieldSets/SparseFieldSetTests.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/SparseFieldSets/SparseFieldSetTests.cs @@ -24,9 +24,9 @@ public SparseFieldSetTests(IntegrationTestContext { - services.AddResourceRepository>(); - services.AddResourceRepository>(); - services.AddResourceRepository>(); + services.AddResourceRepository>(); + services.AddResourceRepository>(); + services.AddResourceRepository>(); services.AddSingleton(); }); diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/WebAccount.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/WebAccount.cs index 70133fba54..c32431ec84 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/WebAccount.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/QueryStrings/WebAccount.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.QueryStrings; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.QueryStrings")] -public sealed class WebAccount : Identifiable +public sealed class WebAccount : Identifiable { [Attr] public string UserName { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/RequiredRelationships/Customer.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/RequiredRelationships/Customer.cs index c3ec0ad36c..952eed4e1f 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/RequiredRelationships/Customer.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/RequiredRelationships/Customer.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.RequiredRelationships; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.RequiredRelationships")] -public sealed class Customer : Identifiable +public sealed class Customer : Identifiable { [Attr] public string EmailAddress { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/RequiredRelationships/Order.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/RequiredRelationships/Order.cs index 1ad05f412b..390556bf9f 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/RequiredRelationships/Order.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/RequiredRelationships/Order.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.RequiredRelationships; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.RequiredRelationships")] -public sealed class Order : Identifiable +public sealed class Order : Identifiable { [Attr] public decimal Amount { get; set; } diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/RequiredRelationships/Shipment.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/RequiredRelationships/Shipment.cs index fa84f8bd7a..ed14d0a946 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/RequiredRelationships/Shipment.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/RequiredRelationships/Shipment.cs @@ -8,7 +8,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.RequiredRelationships; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.RequiredRelationships")] -public sealed class Shipment : Identifiable +public sealed class Shipment : Identifiable { [Attr] public string TrackAndTraceCode { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceConstructorInjection/GiftCertificate.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceConstructorInjection/GiftCertificate.cs index 169df54e16..21fd40efd5 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceConstructorInjection/GiftCertificate.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceConstructorInjection/GiftCertificate.cs @@ -7,7 +7,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.ResourceConstructorInjection; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.ResourceConstructorInjection")] -public sealed class GiftCertificate(InjectionDbContext injectionDbContext) : Identifiable +public sealed class GiftCertificate(InjectionDbContext injectionDbContext) : Identifiable { private readonly TimeProvider _timeProvider = injectionDbContext.TimeProvider; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceConstructorInjection/PostOffice.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceConstructorInjection/PostOffice.cs index 129efabe9f..ef91b2b1a6 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceConstructorInjection/PostOffice.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceConstructorInjection/PostOffice.cs @@ -7,7 +7,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.ResourceConstructorInjection; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.ResourceConstructorInjection")] -public sealed class PostOffice(InjectionDbContext injectionDbContext) : Identifiable +public sealed class PostOffice(InjectionDbContext injectionDbContext) : Identifiable { private readonly TimeProvider _timeProvider = injectionDbContext.TimeProvider; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceConstructorInjection/ResourceInjectionTests.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceConstructorInjection/ResourceInjectionTests.cs index 02fdf3fc1b..9385ffa4fc 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceConstructorInjection/ResourceInjectionTests.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceConstructorInjection/ResourceInjectionTests.cs @@ -189,7 +189,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => resource.Attributes.Should().ContainKey("isOpen").WhoseValue.Should().Be(false); }); - int newCertificateId = int.Parse(responseDocument.Data.SingleValue.Id.Should().NotBeNull().And.Subject); + long newCertificateId = long.Parse(responseDocument.Data.SingleValue.Id.Should().NotBeNull().And.Subject); await _testContext.RunOnDatabaseAsync(async dbContext => { @@ -303,7 +303,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => public async Task Cannot_delete_unknown_resource() { // Arrange - string officeId = Unknown.StringId.For(); + string officeId = Unknown.StringId.For(); string route = $"/postOffices/{officeId}"; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/Constellation.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/Constellation.cs index 371c72bcf8..72bd00a662 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/Constellation.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/Constellation.cs @@ -7,7 +7,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.ResourceDefinitions.Reading; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.ResourceDefinitions.Reading")] -public sealed class Constellation : Identifiable +public sealed class Constellation : Identifiable { [Attr] public string Name { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/ConstellationDefinition.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/ConstellationDefinition.cs index b74d3c4947..0eecab2aed 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/ConstellationDefinition.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/ConstellationDefinition.cs @@ -8,7 +8,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.ResourceDefinitions.Reading; [UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSignature)] public sealed class ConstellationDefinition( IResourceGraph resourceGraph, IClientSettingsProvider clientSettingsProvider, ResourceDefinitionHitCounter hitCounter) - : HitCountingResourceDefinition(resourceGraph, hitCounter) + : HitCountingResourceDefinition(resourceGraph, hitCounter) { private readonly IClientSettingsProvider _clientSettingsProvider = clientSettingsProvider; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/Moon.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/Moon.cs index f6d16fed1b..3ce6cde44c 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/Moon.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/Moon.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.ResourceDefinitions.Reading; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.ResourceDefinitions.Reading")] -public sealed class Moon : Identifiable +public sealed class Moon : Identifiable { [Attr] public string Name { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/MoonDefinition.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/MoonDefinition.cs index ada3bce0f7..516ee456ac 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/MoonDefinition.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/MoonDefinition.cs @@ -11,7 +11,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.ResourceDefinitions.Reading; [UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSignature)] // The constructor parameters will be resolved from the container, which means you can take on any dependency that is also defined in the container. public sealed class MoonDefinition(IResourceGraph resourceGraph, IClientSettingsProvider clientSettingsProvider, ResourceDefinitionHitCounter hitCounter) - : HitCountingResourceDefinition(resourceGraph, hitCounter) + : HitCountingResourceDefinition(resourceGraph, hitCounter) { private readonly IClientSettingsProvider _clientSettingsProvider = clientSettingsProvider; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/Planet.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/Planet.cs index 531ee6cb8c..33a5fe1081 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/Planet.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/Planet.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.ResourceDefinitions.Reading; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.ResourceDefinitions.Reading")] -public sealed class Planet : Identifiable +public sealed class Planet : Identifiable { [Attr] public string PublicName { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/PlanetDefinition.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/PlanetDefinition.cs index d4a0c23af8..8785a331b5 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/PlanetDefinition.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/PlanetDefinition.cs @@ -12,7 +12,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.ResourceDefinitions.Reading; [UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSignature)] // The constructor parameters will be resolved from the container, which means you can take on any dependency that is also defined in the container. public sealed class PlanetDefinition(IResourceGraph resourceGraph, IClientSettingsProvider clientSettingsProvider, ResourceDefinitionHitCounter hitCounter) - : HitCountingResourceDefinition(resourceGraph, hitCounter) + : HitCountingResourceDefinition(resourceGraph, hitCounter) { private readonly IClientSettingsProvider _clientSettingsProvider = clientSettingsProvider; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/Star.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/Star.cs index b8c78109ed..48bc6f0e44 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/Star.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/Star.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.ResourceDefinitions.Reading; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.ResourceDefinitions.Reading")] -public sealed class Star : Identifiable +public sealed class Star : Identifiable { [Attr] public string Name { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/StarDefinition.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/StarDefinition.cs index 3e4f9b678c..375e3a5792 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/StarDefinition.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/StarDefinition.cs @@ -9,7 +9,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.ResourceDefinitions.Reading; [UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSignature)] // The constructor parameters will be resolved from the container, which means you can take on any dependency that is also defined in the container. public sealed class StarDefinition(IResourceGraph resourceGraph, IClientSettingsProvider clientSettingsProvider, ResourceDefinitionHitCounter hitCounter) - : HitCountingResourceDefinition(resourceGraph, hitCounter) + : HitCountingResourceDefinition(resourceGraph, hitCounter) { private readonly IClientSettingsProvider _clientSettingsProvider = clientSettingsProvider; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Serialization/ResourceDefinitionSerializationTests.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Serialization/ResourceDefinitionSerializationTests.cs index 02d04b03f7..c214dee7b9 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Serialization/ResourceDefinitionSerializationTests.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Serialization/ResourceDefinitionSerializationTests.cs @@ -366,7 +366,7 @@ public async Task Decrypts_on_create_resource() socialSecurityNumber.Should().Be(newSocialSecurityNumber); }); - int newStudentId = int.Parse(responseDocument.Data.SingleValue.Id.Should().NotBeNull().And.Subject); + long newStudentId = long.Parse(responseDocument.Data.SingleValue.Id.Should().NotBeNull().And.Subject); await _testContext.RunOnDatabaseAsync(async dbContext => { diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Serialization/Scholarship.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Serialization/Scholarship.cs index b85ba68f43..a5a75eb939 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Serialization/Scholarship.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Serialization/Scholarship.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.ResourceDefinitions.Serializat [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.ResourceDefinitions.Serialization")] -public sealed class Scholarship : Identifiable +public sealed class Scholarship : Identifiable { [Attr] public string ProgramName { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Serialization/Student.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Serialization/Student.cs index 61ef124269..fa20cb05c6 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Serialization/Student.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Serialization/Student.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.ResourceDefinitions.Serializat [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.ResourceDefinitions.Serialization")] -public sealed class Student : Identifiable +public sealed class Student : Identifiable { [Attr] public string Name { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Serialization/StudentDefinition.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Serialization/StudentDefinition.cs index 26e6eee785..8b225527b2 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Serialization/StudentDefinition.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Serialization/StudentDefinition.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.ResourceDefinitions.Serializat [UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSignature)] // The constructor parameters will be resolved from the container, which means you can take on any dependency that is also defined in the container. public sealed class StudentDefinition(IResourceGraph resourceGraph, IEncryptionService encryptionService, ResourceDefinitionHitCounter hitCounter) - : HitCountingResourceDefinition(resourceGraph, hitCounter) + : HitCountingResourceDefinition(resourceGraph, hitCounter) { private readonly IEncryptionService _encryptionService = encryptionService; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Bed.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Bed.cs index 484a25a2a6..c8aa8ba5a5 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Bed.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Bed.cs @@ -7,7 +7,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.RestrictedControllers; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(GenerateControllerEndpoints = JsonApiEndpoints.Query, ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.RestrictedControllers")] -public sealed class Bed : Identifiable +public sealed class Bed : Identifiable { [Attr] public bool IsDouble { get; set; } diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Chair.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Chair.cs index 3f2b303ad8..f6c324a2d1 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Chair.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Chair.cs @@ -7,7 +7,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.RestrictedControllers; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(GenerateControllerEndpoints = NoRelationshipEndpoints, ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.RestrictedControllers")] -public sealed class Chair : Identifiable +public sealed class Chair : Identifiable { private const JsonApiEndpoints NoRelationshipEndpoints = JsonApiEndpoints.GetCollection | JsonApiEndpoints.GetSingle | JsonApiEndpoints.Post | JsonApiEndpoints.Patch | JsonApiEndpoints.Delete; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Pillow.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Pillow.cs index 304c0a5e53..221555555f 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Pillow.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Pillow.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.RestrictedControllers; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.RestrictedControllers")] -public sealed class Pillow : Identifiable +public sealed class Pillow : Identifiable { [Attr] public string Color { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Room.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Room.cs index 8b09419c2b..dabff54a67 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Room.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Room.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.RestrictedControllers; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.RestrictedControllers")] -public sealed class Room : Identifiable +public sealed class Room : Identifiable { [Attr] public int WindowCount { get; set; } diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Sofa.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Sofa.cs index 813b08c56e..99ee7ee6ff 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Sofa.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Sofa.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.RestrictedControllers; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.RestrictedControllers")] -public sealed class Sofa : Identifiable +public sealed class Sofa : Identifiable { [Attr] public int SeatCount { get; set; } diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Table.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Table.cs index 1f3225af9d..17259d7e14 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Table.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/RestrictedControllers/Table.cs @@ -7,7 +7,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.RestrictedControllers; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(GenerateControllerEndpoints = JsonApiEndpoints.Command, ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.RestrictedControllers")] -public sealed class Table : Identifiable +public sealed class Table : Identifiable { [Attr] public int LegCount { get; set; } diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/SoftDeletion/Company.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/SoftDeletion/Company.cs index d9b74411f9..d1ea71a8d8 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/SoftDeletion/Company.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/SoftDeletion/Company.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.SoftDeletion; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.SoftDeletion")] -public sealed class Company : Identifiable, ISoftDeletable +public sealed class Company : Identifiable, ISoftDeletable { [Attr] public string Name { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/SoftDeletion/Department.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/SoftDeletion/Department.cs index 82e2e59007..f006ff015d 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/SoftDeletion/Department.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/SoftDeletion/Department.cs @@ -6,7 +6,7 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.SoftDeletion; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "JsonApiDotNetCoreTests.IntegrationTests.SoftDeletion")] -public sealed class Department : Identifiable, ISoftDeletable +public sealed class Department : Identifiable, ISoftDeletable { [Attr] public string Name { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/SoftDeletion/SoftDeletionTests.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/SoftDeletion/SoftDeletionTests.cs index 2badb7e252..71cab6bdb3 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/SoftDeletion/SoftDeletionTests.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/SoftDeletion/SoftDeletionTests.cs @@ -28,8 +28,8 @@ public SoftDeletionTests(IntegrationTestContext { - services.AddResourceService>(); - services.AddResourceService>(); + services.AddResourceService>(); + services.AddResourceService>(); }); testContext.PostConfigureServices(services => services.Replace(ServiceDescriptor.Singleton(new FrozenTimeProvider(CurrentTime)))); diff --git a/test/JsonApiDotNetCoreTests/UnitTests/Configuration/DependencyContainerRegistrationTests.cs b/test/JsonApiDotNetCoreTests/UnitTests/Configuration/DependencyContainerRegistrationTests.cs index 1bf13394b5..03193da2f4 100644 --- a/test/JsonApiDotNetCoreTests/UnitTests/Configuration/DependencyContainerRegistrationTests.cs +++ b/test/JsonApiDotNetCoreTests/UnitTests/Configuration/DependencyContainerRegistrationTests.cs @@ -182,7 +182,7 @@ private sealed class DependencyContainerRegistrationDbContext(DbContextOptions + private sealed class Resource : Identifiable { [Attr] public string? Field { get; set; } diff --git a/test/JsonApiDotNetCoreTests/UnitTests/Configuration/ServiceCollectionExtensionsTests.cs b/test/JsonApiDotNetCoreTests/UnitTests/Configuration/ServiceCollectionExtensionsTests.cs index 55ff20306b..177cd19fdb 100644 --- a/test/JsonApiDotNetCoreTests/UnitTests/Configuration/ServiceCollectionExtensionsTests.cs +++ b/test/JsonApiDotNetCoreTests/UnitTests/Configuration/ServiceCollectionExtensionsTests.cs @@ -576,5 +576,5 @@ private sealed class TestDbContext(DbContextOptions options) } [UsedImplicitly(ImplicitUseKindFlags.Access)] - private sealed class Person : Identifiable; + private sealed class Person : Identifiable; } diff --git a/test/JsonApiDotNetCoreTests/UnitTests/Links/LinkInclusionTests.cs b/test/JsonApiDotNetCoreTests/UnitTests/Links/LinkInclusionTests.cs index b6d7c8b618..76760be7d7 100644 --- a/test/JsonApiDotNetCoreTests/UnitTests/Links/LinkInclusionTests.cs +++ b/test/JsonApiDotNetCoreTests/UnitTests/Links/LinkInclusionTests.cs @@ -393,7 +393,7 @@ public void Applies_cascading_settings_for_relationship_links(LinkTypes linksInR } } - private sealed class ExampleResource : Identifiable; + private sealed class ExampleResource : Identifiable; private sealed class FakeHttpContextAccessor : IHttpContextAccessor { diff --git a/test/JsonApiDotNetCoreTests/UnitTests/Middleware/JsonApiMiddlewareTests.cs b/test/JsonApiDotNetCoreTests/UnitTests/Middleware/JsonApiMiddlewareTests.cs index ad1f5df24f..9a7a39fcf3 100644 --- a/test/JsonApiDotNetCoreTests/UnitTests/Middleware/JsonApiMiddlewareTests.cs +++ b/test/JsonApiDotNetCoreTests/UnitTests/Middleware/JsonApiMiddlewareTests.cs @@ -54,9 +54,9 @@ public async Task Sets_request_properties_correctly(string requestMethod, string // @formatter:wrap_before_first_method_call true IResourceGraph resourceGraph = new ResourceGraphBuilder(options, NullLoggerFactory.Instance) - .Add() - .Add() - .Add() + .Add() + .Add() + .Add() .Build(); // @formatter:wrap_before_first_method_call restore @@ -180,17 +180,17 @@ public enum IsCollection } [UsedImplicitly(ImplicitUseTargetFlags.Itself)] - private sealed class Person : Identifiable; + private sealed class Person : Identifiable; [UsedImplicitly(ImplicitUseTargetFlags.Members)] - private sealed class ItemTag : Identifiable + private sealed class ItemTag : Identifiable { [HasMany] public ISet TodoItems { get; set; } = new HashSet(); } [UsedImplicitly(ImplicitUseTargetFlags.Members)] - private sealed class TodoItem : Identifiable + private sealed class TodoItem : Identifiable { [HasOne] public Person? Owner { get; set; } diff --git a/test/JsonApiDotNetCoreTests/UnitTests/ModelStateValidation/ModelStateValidationTests.cs b/test/JsonApiDotNetCoreTests/UnitTests/ModelStateValidation/ModelStateValidationTests.cs index e3a0a26cd9..17a62b3de3 100644 --- a/test/JsonApiDotNetCoreTests/UnitTests/ModelStateValidation/ModelStateValidationTests.cs +++ b/test/JsonApiDotNetCoreTests/UnitTests/ModelStateValidation/ModelStateValidationTests.cs @@ -37,7 +37,7 @@ public void Renders_JSON_path_for_ModelState_key_in_resource_request(string mode { // Arrange var options = new JsonApiOptions(); - IResourceGraph resourceGraph = new ResourceGraphBuilder(options, NullLoggerFactory.Instance).Add().Add().Build(); + IResourceGraph resourceGraph = new ResourceGraphBuilder(options, NullLoggerFactory.Instance).Add().Add().Build(); var modelState = new ModelStateDictionary(); modelState.AddModelError(modelStateKey, "(ignored error message)"); @@ -83,7 +83,7 @@ public void Renders_JSON_path_for_ModelState_key_in_operations_request(string mo { // Arrange var options = new JsonApiOptions(); - IResourceGraph resourceGraph = new ResourceGraphBuilder(options, NullLoggerFactory.Instance).Add().Add().Build(); + IResourceGraph resourceGraph = new ResourceGraphBuilder(options, NullLoggerFactory.Instance).Add().Add().Build(); var modelState = new ModelStateDictionary(); modelState.AddModelError(modelStateKey, "(ignored error message)"); @@ -107,7 +107,7 @@ public void Renders_JSON_path_for_ModelState_key_in_operations_request(string mo } [UsedImplicitly(ImplicitUseTargetFlags.Members)] - private sealed class Parent : Identifiable + private sealed class Parent : Identifiable { public string? NotMappedInParent { get; set; } @@ -128,7 +128,7 @@ private sealed class Parent : Identifiable } [UsedImplicitly(ImplicitUseTargetFlags.Members)] - private sealed class Child : Identifiable + private sealed class Child : Identifiable { public string? NotMappedInChild { get; set; } diff --git a/test/JsonApiDotNetCoreTests/UnitTests/Queries/QueryExpressionRewriterTests.cs b/test/JsonApiDotNetCoreTests/UnitTests/Queries/QueryExpressionRewriterTests.cs index a691706c15..d182e9b60e 100644 --- a/test/JsonApiDotNetCoreTests/UnitTests/Queries/QueryExpressionRewriterTests.cs +++ b/test/JsonApiDotNetCoreTests/UnitTests/Queries/QueryExpressionRewriterTests.cs @@ -19,16 +19,16 @@ public sealed class QueryExpressionRewriterTests // @formatter:wrap_before_first_method_call true private static readonly IResourceGraph ResourceGraph = new ResourceGraphBuilder(new JsonApiOptions(), NullLoggerFactory.Instance) - .Add() - .Add() - .Add() - .Add() - .Add() - .Add() - .Add() - .Add() - .Add() - .Add() + .Add() + .Add() + .Add() + .Add() + .Add() + .Add() + .Add() + .Add() + .Add() + .Add() .Build(); // @formatter:wrap_chained_method_calls restore diff --git a/test/JsonApiDotNetCoreTests/UnitTests/QueryStringParameters/BaseParseTests.cs b/test/JsonApiDotNetCoreTests/UnitTests/QueryStringParameters/BaseParseTests.cs index a1008458f4..54ebf9b971 100644 --- a/test/JsonApiDotNetCoreTests/UnitTests/QueryStringParameters/BaseParseTests.cs +++ b/test/JsonApiDotNetCoreTests/UnitTests/QueryStringParameters/BaseParseTests.cs @@ -19,16 +19,16 @@ protected BaseParseTests() // @formatter:wrap_before_first_method_call true ResourceGraph = new ResourceGraphBuilder(Options, NullLoggerFactory.Instance) - .Add() - .Add() - .Add() - .Add() - .Add() - .Add() - .Add() - .Add() - .Add() - .Add() + .Add() + .Add() + .Add() + .Add() + .Add() + .Add() + .Add() + .Add() + .Add() + .Add() .Build(); // @formatter:wrap_chained_method_calls restore diff --git a/test/JsonApiDotNetCoreTests/UnitTests/ResourceGraph/ResourceGraphBuilderTests.cs b/test/JsonApiDotNetCoreTests/UnitTests/ResourceGraph/ResourceGraphBuilderTests.cs index 597a5d9d89..0c97e1da80 100644 --- a/test/JsonApiDotNetCoreTests/UnitTests/ResourceGraph/ResourceGraphBuilderTests.cs +++ b/test/JsonApiDotNetCoreTests/UnitTests/ResourceGraph/ResourceGraphBuilderTests.cs @@ -22,7 +22,7 @@ public void Resource_without_public_name_gets_pluralized_with_naming_convention_ var builder = new ResourceGraphBuilder(options, NullLoggerFactory.Instance); // Act - builder.Add(); + builder.Add(); // Assert IResourceGraph resourceGraph = builder.Build(); @@ -39,7 +39,7 @@ public void Attribute_without_public_name_gets_naming_convention_applied() var builder = new ResourceGraphBuilder(options, NullLoggerFactory.Instance); // Act - builder.Add(); + builder.Add(); // Assert IResourceGraph resourceGraph = builder.Build(); @@ -57,7 +57,7 @@ public void HasOne_relationship_without_public_name_gets_naming_convention_appli var builder = new ResourceGraphBuilder(options, NullLoggerFactory.Instance); // Act - builder.Add(); + builder.Add(); // Assert IResourceGraph resourceGraph = builder.Build(); @@ -75,7 +75,7 @@ public void HasMany_relationship_without_public_name_gets_naming_convention_appl var builder = new ResourceGraphBuilder(options, NullLoggerFactory.Instance); // Act - builder.Add(); + builder.Add(); // Assert IResourceGraph resourceGraph = builder.Build(); @@ -91,10 +91,10 @@ public void Cannot_use_duplicate_resource_name() // Arrange var options = new JsonApiOptions(); var builder = new ResourceGraphBuilder(options, NullLoggerFactory.Instance); - builder.Add("duplicate"); + builder.Add("duplicate"); // Act - Action action = () => builder.Add("duplicate"); + Action action = () => builder.Add("duplicate"); // Assert action.Should().ThrowExactly().WithMessage( @@ -109,7 +109,7 @@ public void Cannot_use_duplicate_attribute_name() var builder = new ResourceGraphBuilder(options, NullLoggerFactory.Instance); // Act - Action action = () => builder.Add(); + Action action = () => builder.Add(); // Assert action.Should().ThrowExactly().WithMessage($"Properties '{typeof(ResourceWithDuplicateAttrPublicName)}.Value1' and " + @@ -124,7 +124,7 @@ public void Cannot_use_duplicate_relationship_name() var builder = new ResourceGraphBuilder(options, NullLoggerFactory.Instance); // Act - Action action = () => builder.Add(); + Action action = () => builder.Add(); // Assert action.Should().ThrowExactly().WithMessage( @@ -140,7 +140,7 @@ public void Cannot_use_duplicate_attribute_and_relationship_name() var builder = new ResourceGraphBuilder(options, NullLoggerFactory.Instance); // Act - Action action = () => builder.Add(); + Action action = () => builder.Add(); // Assert action.Should().ThrowExactly().WithMessage( @@ -169,8 +169,8 @@ public void Can_remove_existing_resource_type() // Arrange var options = new JsonApiOptions(); var builder = new ResourceGraphBuilder(options, NullLoggerFactory.Instance); - builder.Add(); - builder.Add(); + builder.Add(); + builder.Add(); // Act builder.Remove(); @@ -186,7 +186,7 @@ public void Can_remove_missing_resource_type() // Arrange var options = new JsonApiOptions(); var builder = new ResourceGraphBuilder(options, NullLoggerFactory.Instance); - builder.Add(); + builder.Add(); // Act builder.Remove(); @@ -202,7 +202,7 @@ public void Can_remove_non_resource_type() // Arrange var options = new JsonApiOptions(); var builder = new ResourceGraphBuilder(options, NullLoggerFactory.Instance); - builder.Add(); + builder.Add(); // Act builder.Remove(typeof(NonResource)); @@ -219,7 +219,7 @@ public void Cannot_build_graph_with_missing_related_HasOne_resource() var options = new JsonApiOptions(); var builder = new ResourceGraphBuilder(options, NullLoggerFactory.Instance); - builder.Add(); + builder.Add(); // Act Action action = () => builder.Build(); @@ -236,7 +236,7 @@ public void Cannot_build_graph_with_missing_related_HasMany_resource() var options = new JsonApiOptions(); var builder = new ResourceGraphBuilder(options, NullLoggerFactory.Instance); - builder.Add(); + builder.Add(); // Act Action action = () => builder.Build(); @@ -253,8 +253,8 @@ public void Cannot_build_graph_with_different_attribute_name_in_derived_type() var options = new JsonApiOptions(); var builder = new ResourceGraphBuilder(options, NullLoggerFactory.Instance); - builder.Add(); - builder.Add(); + builder.Add(); + builder.Add(); // Act Action action = () => builder.Build(); @@ -271,8 +271,8 @@ public void Cannot_build_graph_with_different_ToOne_relationship_name_in_derived var options = new JsonApiOptions(); var builder = new ResourceGraphBuilder(options, NullLoggerFactory.Instance); - builder.Add(); - builder.Add(); + builder.Add(); + builder.Add(); // Act Action action = () => builder.Build(); @@ -289,8 +289,8 @@ public void Cannot_build_graph_with_different_ToMany_relationship_name_in_derive var options = new JsonApiOptions(); var builder = new ResourceGraphBuilder(options, NullLoggerFactory.Instance); - builder.Add(); - builder.Add(); + builder.Add(); + builder.Add(); // Act Action action = () => builder.Build(); @@ -347,7 +347,7 @@ public void Logs_warning_when_adding_resource_without_attributes() var builder = new ResourceGraphBuilder(options, loggerFactory); // Act - builder.Add(); + builder.Add(); // Assert IReadOnlyList logLines = loggerProvider.GetLines(); @@ -418,21 +418,21 @@ public void Can_override_capabilities_on_Id_property() } [UsedImplicitly(ImplicitUseTargetFlags.Members)] - private sealed class ResourceWithHasOneRelationship : Identifiable + private sealed class ResourceWithHasOneRelationship : Identifiable { [HasOne] public ResourceWithAttribute? PrimaryChild { get; set; } } [UsedImplicitly(ImplicitUseTargetFlags.Members)] - private sealed class ResourceWithHasManyRelationship : Identifiable + private sealed class ResourceWithHasManyRelationship : Identifiable { [HasMany] public ISet Children { get; set; } = new HashSet(); } [UsedImplicitly(ImplicitUseTargetFlags.Members)] - private sealed class ResourceWithAttribute : Identifiable + private sealed class ResourceWithAttribute : Identifiable { [Attr] public string? PrimaryValue { get; set; } @@ -445,7 +445,7 @@ private sealed class ResourceWithAttribute : Identifiable } [UsedImplicitly(ImplicitUseTargetFlags.Members)] - private sealed class ResourceWithDuplicateAttrPublicName : Identifiable + private sealed class ResourceWithDuplicateAttrPublicName : Identifiable { [Attr(PublicName = "duplicate")] public string? Value1 { get; set; } @@ -455,7 +455,7 @@ private sealed class ResourceWithDuplicateAttrPublicName : Identifiable } [UsedImplicitly(ImplicitUseTargetFlags.Members)] - private sealed class ResourceWithDuplicateRelationshipPublicName : Identifiable + private sealed class ResourceWithDuplicateRelationshipPublicName : Identifiable { [HasOne(PublicName = "duplicate")] public ResourceWithHasOneRelationship? PrimaryChild { get; set; } @@ -465,7 +465,7 @@ private sealed class ResourceWithDuplicateRelationshipPublicName : Identifiable< } [UsedImplicitly(ImplicitUseTargetFlags.Members)] - private sealed class ResourceWithDuplicateAttrRelationshipPublicName : Identifiable + private sealed class ResourceWithDuplicateAttrRelationshipPublicName : Identifiable { [Attr(PublicName = "duplicate")] public string? Value { get; set; } @@ -509,7 +509,7 @@ public sealed class ResourceWithIdOverride : Identifiable } [UsedImplicitly(ImplicitUseTargetFlags.Members)] - public abstract class AbstractBaseResource : Identifiable + public abstract class AbstractBaseResource : Identifiable { [Attr(PublicName = "baseValue")] public virtual int Value { get; set; } diff --git a/test/JsonApiDotNetCoreTests/UnitTests/Serialization/InputConversionTests.cs b/test/JsonApiDotNetCoreTests/UnitTests/Serialization/InputConversionTests.cs index a7bc52ee4b..53f84ff144 100644 --- a/test/JsonApiDotNetCoreTests/UnitTests/Serialization/InputConversionTests.cs +++ b/test/JsonApiDotNetCoreTests/UnitTests/Serialization/InputConversionTests.cs @@ -243,17 +243,17 @@ public void Converts_various_data_types_with_defaults() } private DocumentAdapter CreateDocumentAdapter(Func createRequest) - where TResource : Identifiable + where TResource : Identifiable { var options = new JsonApiOptions(); - IResourceGraph resourceGraph = new ResourceGraphBuilder(options, NullLoggerFactory.Instance).Add().Build(); + IResourceGraph resourceGraph = new ResourceGraphBuilder(options, NullLoggerFactory.Instance).Add().Build(); options.SerializerOptions.Converters.Add(new ResourceObjectConverter(resourceGraph)); var resourceFactory = new ResourceFactory(_serviceProvider); var resourceDefinitionAccessor = new ResourceDefinitionAccessor(resourceGraph, _serviceProvider); _serviceProvider.AddService(typeof(IResourceDefinitionAccessor), resourceDefinitionAccessor); - _serviceProvider.AddService(typeof(IResourceDefinition), new JsonApiResourceDefinition(resourceGraph)); + _serviceProvider.AddService(typeof(IResourceDefinition), new JsonApiResourceDefinition(resourceGraph)); JsonApiRequest request = createRequest(resourceGraph); var targetedFields = new TargetedFields(); @@ -281,7 +281,7 @@ public void Dispose() } [UsedImplicitly(ImplicitUseTargetFlags.Members)] - public sealed class ResourceWithVariousDataTypes : Identifiable + public sealed class ResourceWithVariousDataTypes : Identifiable { [Attr] public bool Boolean { get; set; } diff --git a/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/Models/Article.cs b/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/Models/Article.cs index 6f1a362d08..dfb556bab3 100644 --- a/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/Models/Article.cs +++ b/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/Models/Article.cs @@ -5,7 +5,7 @@ namespace JsonApiDotNetCoreTests.UnitTests.Serialization.Response.Models; [UsedImplicitly(ImplicitUseTargetFlags.Members)] -public sealed class Article : Identifiable +public sealed class Article : Identifiable { [Attr] public string Title { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/Models/Blog.cs b/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/Models/Blog.cs index ec2b476a2e..55d75af2fa 100644 --- a/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/Models/Blog.cs +++ b/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/Models/Blog.cs @@ -5,7 +5,7 @@ namespace JsonApiDotNetCoreTests.UnitTests.Serialization.Response.Models; [UsedImplicitly(ImplicitUseTargetFlags.Members)] -public sealed class Blog : Identifiable +public sealed class Blog : Identifiable { [Attr] public string Title { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/Models/Food.cs b/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/Models/Food.cs index 084f7f5469..3a06c037d7 100644 --- a/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/Models/Food.cs +++ b/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/Models/Food.cs @@ -5,7 +5,7 @@ namespace JsonApiDotNetCoreTests.UnitTests.Serialization.Response.Models; [UsedImplicitly(ImplicitUseTargetFlags.Members)] -public sealed class Food : Identifiable +public sealed class Food : Identifiable { [Attr] public string Dish { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/Models/Person.cs b/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/Models/Person.cs index 9f36aebd3e..a5b86ed950 100644 --- a/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/Models/Person.cs +++ b/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/Models/Person.cs @@ -5,7 +5,7 @@ namespace JsonApiDotNetCoreTests.UnitTests.Serialization.Response.Models; [UsedImplicitly(ImplicitUseTargetFlags.Members)] -public sealed class Person : Identifiable +public sealed class Person : Identifiable { [Attr] public string Name { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/Models/Song.cs b/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/Models/Song.cs index 89475b40d6..b9822f95a0 100644 --- a/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/Models/Song.cs +++ b/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/Models/Song.cs @@ -5,7 +5,7 @@ namespace JsonApiDotNetCoreTests.UnitTests.Serialization.Response.Models; [UsedImplicitly(ImplicitUseTargetFlags.Members)] -public sealed class Song : Identifiable +public sealed class Song : Identifiable { [Attr] public string Title { get; set; } = null!; diff --git a/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/ResponseModelAdapterTests.cs b/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/ResponseModelAdapterTests.cs index 89de6ba3e8..3a60bd1279 100644 --- a/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/ResponseModelAdapterTests.cs +++ b/test/JsonApiDotNetCoreTests/UnitTests/Serialization/Response/ResponseModelAdapterTests.cs @@ -577,11 +577,11 @@ private ResponseModelAdapter CreateAdapter(IJsonApiOptions options, string? prim // @formatter:wrap_before_first_method_call true IResourceGraph resourceGraph = new ResourceGraphBuilder(options, NullLoggerFactory.Instance) - .Add() - .Add() - .Add() - .Add() - .Add() + .Add() + .Add() + .Add() + .Add() + .Add() .Build(); // @formatter:wrap_chained_method_calls restore diff --git a/test/OpenApiTests/NamingConventions/StaffMember.cs b/test/OpenApiTests/NamingConventions/StaffMember.cs index b2df548a17..beeeb3f997 100644 --- a/test/OpenApiTests/NamingConventions/StaffMember.cs +++ b/test/OpenApiTests/NamingConventions/StaffMember.cs @@ -6,7 +6,7 @@ namespace OpenApiTests.NamingConventions; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "OpenApiTests.NamingConventions")] -public sealed class StaffMember : Identifiable +public sealed class StaffMember : Identifiable { [Attr] public string Name { get; set; } = null!; diff --git a/test/OpenApiTests/NamingConventions/Supermarket.cs b/test/OpenApiTests/NamingConventions/Supermarket.cs index 4bde8776da..ea7a2cb8c4 100644 --- a/test/OpenApiTests/NamingConventions/Supermarket.cs +++ b/test/OpenApiTests/NamingConventions/Supermarket.cs @@ -6,7 +6,7 @@ namespace OpenApiTests.NamingConventions; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(ControllerNamespace = "OpenApiTests.NamingConventions")] -public sealed class Supermarket : Identifiable +public sealed class Supermarket : Identifiable { [Attr] public string NameOfCity { get; set; } = null!; diff --git a/test/OpenApiTests/ResourceFieldValidation/NullableReferenceTypesOff/NrtOffEmpty.cs b/test/OpenApiTests/ResourceFieldValidation/NullableReferenceTypesOff/NrtOffEmpty.cs index a64fd34af5..3f1cddee0a 100644 --- a/test/OpenApiTests/ResourceFieldValidation/NullableReferenceTypesOff/NrtOffEmpty.cs +++ b/test/OpenApiTests/ResourceFieldValidation/NullableReferenceTypesOff/NrtOffEmpty.cs @@ -8,4 +8,4 @@ namespace OpenApiTests.ResourceFieldValidation.NullableReferenceTypesOff; [UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSignature)] [Resource(PublicName = "empties", ControllerNamespace = "OpenApiTests.ResourceFieldValidation")] -public class NrtOffEmpty : Identifiable; +public class NrtOffEmpty : Identifiable; diff --git a/test/OpenApiTests/ResourceFieldValidation/NullableReferenceTypesOff/NrtOffResource.cs b/test/OpenApiTests/ResourceFieldValidation/NullableReferenceTypesOff/NrtOffResource.cs index 968d579d49..ba6669c08f 100644 --- a/test/OpenApiTests/ResourceFieldValidation/NullableReferenceTypesOff/NrtOffResource.cs +++ b/test/OpenApiTests/ResourceFieldValidation/NullableReferenceTypesOff/NrtOffResource.cs @@ -9,7 +9,7 @@ namespace OpenApiTests.ResourceFieldValidation.NullableReferenceTypesOff; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(PublicName = "resources", ControllerNamespace = "OpenApiTests.ResourceFieldValidation")] -public sealed class NrtOffResource : Identifiable +public sealed class NrtOffResource : Identifiable { [Attr] public string ReferenceType { get; set; } diff --git a/test/OpenApiTests/ResourceFieldValidation/NullableReferenceTypesOn/NrtOnEmpty.cs b/test/OpenApiTests/ResourceFieldValidation/NullableReferenceTypesOn/NrtOnEmpty.cs index 259cfda06e..bebaf17d53 100644 --- a/test/OpenApiTests/ResourceFieldValidation/NullableReferenceTypesOn/NrtOnEmpty.cs +++ b/test/OpenApiTests/ResourceFieldValidation/NullableReferenceTypesOn/NrtOnEmpty.cs @@ -6,4 +6,4 @@ namespace OpenApiTests.ResourceFieldValidation.NullableReferenceTypesOn; [UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSignature)] [Resource(PublicName = "empties", ControllerNamespace = "OpenApiTests.ResourceFieldValidation")] -public class NrtOnEmpty : Identifiable; +public class NrtOnEmpty : Identifiable; diff --git a/test/OpenApiTests/ResourceFieldValidation/NullableReferenceTypesOn/NrtOnResource.cs b/test/OpenApiTests/ResourceFieldValidation/NullableReferenceTypesOn/NrtOnResource.cs index efc897cea2..69056d716a 100644 --- a/test/OpenApiTests/ResourceFieldValidation/NullableReferenceTypesOn/NrtOnResource.cs +++ b/test/OpenApiTests/ResourceFieldValidation/NullableReferenceTypesOn/NrtOnResource.cs @@ -7,7 +7,7 @@ namespace OpenApiTests.ResourceFieldValidation.NullableReferenceTypesOn; [UsedImplicitly(ImplicitUseTargetFlags.Members)] [Resource(PublicName = "resources", ControllerNamespace = "OpenApiTests.ResourceFieldValidation")] -public sealed class NrtOnResource : Identifiable +public sealed class NrtOnResource : Identifiable { [Attr] public string NonNullableReferenceType { get; set; } = null!; diff --git a/test/UnitTests/Graph/Model.cs b/test/UnitTests/Graph/Model.cs index d0ba3f4eee..5394ca2646 100644 --- a/test/UnitTests/Graph/Model.cs +++ b/test/UnitTests/Graph/Model.cs @@ -2,4 +2,4 @@ namespace UnitTests.Graph; -internal sealed class Model : Identifiable; +internal sealed class Model : Identifiable; diff --git a/test/UnitTests/Graph/TypeLocatorTests.cs b/test/UnitTests/Graph/TypeLocatorTests.cs index 2731dcba0a..79e282a000 100644 --- a/test/UnitTests/Graph/TypeLocatorTests.cs +++ b/test/UnitTests/Graph/TypeLocatorTests.cs @@ -38,7 +38,7 @@ public void GetIdType_Correctly_Identifies_JsonApiResource() Type? idType = typeLocator.LookupIdType(type); // Assert - idType.Should().Be(); + idType.Should().Be(); } [Fact] @@ -70,7 +70,7 @@ public void ResolveResourceDescriptor_Returns_Type_If_Type_Is_IIdentifiable() // Assert descriptor.Should().NotBeNull(); descriptor.ResourceClrType.Should().Be(resourceClrType); - descriptor.IdClrType.Should().Be(); + descriptor.IdClrType.Should().Be(); } [Fact] diff --git a/test/UnitTests/Models/IdentifiableTests.cs b/test/UnitTests/Models/IdentifiableTests.cs index ad11081c65..444965e49f 100644 --- a/test/UnitTests/Models/IdentifiableTests.cs +++ b/test/UnitTests/Models/IdentifiableTests.cs @@ -9,7 +9,7 @@ public sealed class IdentifiableTests [Fact] public void Can_Set_StringId_To_Value_Type() { - var resource = new IntId + var resource = new LongId { StringId = "1" }; @@ -20,7 +20,7 @@ public void Can_Set_StringId_To_Value_Type() [Fact] public void Setting_StringId_To_Null_Sets_Id_As_Default() { - var resource = new IntId + var resource = new LongId { StringId = null }; @@ -31,16 +31,16 @@ public void Setting_StringId_To_Null_Sets_Id_As_Default() [Fact] public void GetStringId_Returns_Null_If_Object_Is_Default() { - var resource = new IntId(); + var resource = new LongId(); string? stringId = resource.ExposedGetStringId(0); stringId.Should().BeNull(); } - private sealed class IntId : Identifiable + private sealed class LongId : Identifiable { - public string? ExposedGetStringId(int value) + public string? ExposedGetStringId(long value) { return GetStringId(value); } diff --git a/test/UnitTests/Models/ResourceConstructionExpressionTests.cs b/test/UnitTests/Models/ResourceConstructionExpressionTests.cs index 48e43d2452..4499db1701 100644 --- a/test/UnitTests/Models/ResourceConstructionExpressionTests.cs +++ b/test/UnitTests/Models/ResourceConstructionExpressionTests.cs @@ -41,10 +41,10 @@ public void When_resource_has_constructor_with_string_parameter_it_must_fail() .WithMessage($"Failed to create an instance of '{typeof(ResourceWithStringConstructor).FullName}': Parameter 'text' could not be resolved."); } - private sealed class ResourceWithoutConstructor : Identifiable; + private sealed class ResourceWithoutConstructor : Identifiable; [UsedImplicitly(ImplicitUseTargetFlags.Members)] - private sealed class ResourceWithStringConstructor : Identifiable + private sealed class ResourceWithStringConstructor : Identifiable { public string Text { get; }