-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed updated events, added integration tests. (#49)
Co-authored-by: Francis Pion <francis.pion@akinox.com>
- Loading branch information
1 parent
f4c9fc6
commit bab47f9
Showing
10 changed files
with
333 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
tests/Logitar.Identity.EFCore.SqlServer.IntegrationTests/AssertRoles.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using Logitar.Identity.Domain.Roles; | ||
using Logitar.Identity.EntityFrameworkCore.Relational.Entities; | ||
|
||
namespace Logitar.Identity.EntityFrameworkCore.SqlServer; | ||
|
||
internal static class AssertRoles | ||
{ | ||
public static void AreEqual(RoleAggregate? role, RoleEntity? entity) | ||
{ | ||
if (role == null || entity == null) | ||
{ | ||
Assert.Null(role); | ||
Assert.Null(entity); | ||
return; | ||
} | ||
|
||
Assert.Equal(role.Version, entity.Version); | ||
Assert.Equal(role.CreatedBy.Value, entity.CreatedBy); | ||
Assertions.Equal(role.CreatedOn, entity.CreatedOn, TimeSpan.FromMinutes(1)); | ||
Assert.Equal(role.UpdatedBy.Value, entity.UpdatedBy); | ||
Assertions.Equal(role.UpdatedOn, entity.UpdatedOn, TimeSpan.FromMinutes(1)); | ||
|
||
Assert.Equal(role.TenantId?.Value, entity.TenantId); | ||
Assert.Equal(role.UniqueName.Value, entity.UniqueName); | ||
Assert.Equal(role.DisplayName?.Value, entity.DisplayName); | ||
Assert.Equal(role.Description?.Value, entity.Description); | ||
|
||
Assert.Equal(role.CustomAttributes, entity.CustomAttributes); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.