-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
19a3c30
commit f893d6e
Showing
6 changed files
with
62 additions
and
51 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
test/Tests.Infrastructure/GraphSon/Entities/Bug_1884_Entity.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,19 @@ | ||
namespace ExRam.Gremlinq.Tests.Infrastructure.GraphSon.Entities | ||
{ | ||
public class Bug_1884_Entity | ||
{ | ||
public Bug_1884_Entity() | ||
{ | ||
MyEnum1 = Bug_1884_Enum.ValueB; | ||
} | ||
|
||
// this default value is overwritten during deserialization (as expected) | ||
public DateTime CreatedAt { get; set; } = TimeProvider.System.GetUtcNow().DateTime.Date; | ||
|
||
// after deserialization, the value of this property is always ValueB (bug) | ||
public Bug_1884_Enum MyEnum1 { get; set; } | ||
|
||
// after deserialization the value of this property is always false (bug) | ||
public bool IsDeleted { get; set; } = false; | ||
} | ||
} |
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,8 @@ | ||
namespace ExRam.Gremlinq.Tests.Infrastructure.GraphSon.Entities | ||
{ | ||
public enum Bug_1884_Enum | ||
{ | ||
ValueA, | ||
ValueB | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
test/Tests.Infrastructure/GraphSon/Entities/ClassWithField.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,7 @@ | ||
namespace ExRam.Gremlinq.Tests.Infrastructure.GraphSon.Entities | ||
{ | ||
public class ClassWithField | ||
{ | ||
public string? Property; | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
test/Tests.Infrastructure/GraphSon/Entities/ClassWithFieldsAndConstructor.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,20 @@ | ||
namespace ExRam.Gremlinq.Tests.Infrastructure.GraphSon.Entities | ||
{ | ||
public class ClassWithFieldsAndConstructor | ||
{ | ||
public ClassWithFieldsAndConstructor(string stringArg, string? nullableStringArg, int intArg, int? nullableIntArg) | ||
{ | ||
StringArg = stringArg; | ||
NullableStringArg = nullableStringArg; | ||
IntArg = intArg; | ||
NullableIntArg = nullableIntArg; | ||
} | ||
|
||
public string StringArg { get; } | ||
public string? NullableStringArg { get; } | ||
public int IntArg { get; } | ||
public int? NullableIntArg { get; } | ||
|
||
public string? SettableString { get; set; } | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
test/Tests.Infrastructure/GraphSon/Entities/ClassWithInitProperty.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,7 @@ | ||
namespace ExRam.Gremlinq.Tests.Infrastructure.GraphSon.Entities | ||
{ | ||
public class ClassWithInitProperty | ||
{ | ||
public string? Property { get; init; } | ||
} | ||
} |
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