Skip to content

Commit 8bf0989

Browse files
author
Bart Koelman
committed
Refactored tests for resource hooks
1 parent 64e09db commit 8bf0989

File tree

15 files changed

+892
-953
lines changed

15 files changed

+892
-953
lines changed

src/Examples/JsonApiDotNetCoreExample/Definitions/TodoHooksDefinition.cs renamed to src/Examples/JsonApiDotNetCoreExample/Definitions/TodoItemHooksDefinition.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
namespace JsonApiDotNetCoreExample.Definitions
1111
{
12-
public class TodoHooksDefinition : LockableHooksDefinition<TodoItem>
12+
public class TodoItemHooksDefinition : LockableHooksDefinition<TodoItem>
1313
{
14-
public TodoHooksDefinition(IResourceGraph resourceGraph) : base(resourceGraph) { }
14+
public TodoItemHooksDefinition(IResourceGraph resourceGraph) : base(resourceGraph) { }
1515

1616
public override void BeforeRead(ResourcePipeline pipeline, bool isIncluded = false, string stringId = null)
1717
{

src/Examples/JsonApiDotNetCoreExample/Dockerfile

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/Examples/JsonApiDotNetCoreExample/Models/User.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ public class User : Identifiable
1111
private readonly ISystemClock _systemClock;
1212
private string _password;
1313

14-
[Attr] public string UserName { get; set; }
14+
[Attr]
15+
public string UserName { get; set; }
1516

1617
[Attr(Capabilities = AttrCapabilities.AllowCreate | AttrCapabilities.AllowChange)]
1718
public string Password
@@ -27,7 +28,8 @@ public string Password
2728
}
2829
}
2930

30-
[Attr] public DateTime LastPasswordChange { get; set; }
31+
[Attr]
32+
public DateTime LastPasswordChange { get; set; }
3133

3234
public User(AppDbContext appDbContext)
3335
{
@@ -37,7 +39,8 @@ public User(AppDbContext appDbContext)
3739

3840
public sealed class SuperUser : User
3941
{
40-
[Attr] public int SecurityLevel { get; set; }
42+
[Attr]
43+
public int SecurityLevel { get; set; }
4144

4245
public SuperUser(AppDbContext appDbContext) : base(appDbContext)
4346
{

src/Examples/JsonApiDotNetCoreExample/Services/CustomArticleService.cs

Lines changed: 0 additions & 37 deletions
This file was deleted.

src/Examples/JsonApiDotNetCoreExample/Startups/TestStartup.cs

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)