Skip to content

Commit 3e0ceed

Browse files
committed
fix failing test
1 parent b1d40f5 commit 3e0ceed

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

test/EntityChange.Tests/EntityCompareTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -984,6 +984,8 @@ public async Task CompareComplexCompareTest()
984984
configuration.Configure(config => config
985985
.Entity<Contact>(e =>
986986
{
987+
e.Property(p => p.Created).Formatter(p => p.ToShortDateString());
988+
e.Property(p => p.Updated).Formatter(p => p.ToShortDateString());
987989
e.Property(p => p.FirstName).Display("First Name");
988990
e.Collection(p => p.Roles)
989991
.CollectionComparison(CollectionComparison.ObjectEquality)

test/EntityChange.Tests/Snapshots/EntityCompareTests.CompareComplexCompareTest.verified.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
[
2+
{
3+
PropertyName: Updated,
4+
DisplayName: Updated,
5+
Path: Updated,
6+
Operation: Replace,
7+
OriginalValue: DateTime_1,
8+
CurrentValue: DateTime_2,
9+
OriginalFormatted: Date_1,
10+
CurrentFormatted: Date_2
11+
},
212
{
313
PropertyName: Roles,
414
DisplayName: Roles,
@@ -36,16 +46,6 @@
3646
OriginalFormatted: New,
3747
CurrentFormatted: Verified
3848
},
39-
{
40-
PropertyName: Updated,
41-
DisplayName: Updated,
42-
Path: Updated,
43-
Operation: Replace,
44-
OriginalValue: DateTime_1,
45-
CurrentValue: DateTime_2,
46-
OriginalFormatted: 1/6/2024 12:00:00 AM,
47-
CurrentFormatted: 1/7/2024 12:00:00 AM
48-
},
4949
{
5050
PropertyName: Zip,
5151
DisplayName: Zip,

0 commit comments

Comments
 (0)