Skip to content

Commit df8db7a

Browse files
author
Jamie Rushton
committed
Added dictionary property to the defaults model
1 parent 93fddda commit df8db7a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/Exceptionless.Tests/Serializer/SerializerTests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public void ShouldIncludeNullObjects() {
6161
var data = new DefaultsModel();
6262
IJsonSerializer serializer = GetSerializer();
6363
string json = serializer.Serialize(data);
64-
Assert.Equal(@"{""number"":0,""bool"":false,""message"":null,""collection"":null}", json);
64+
Assert.Equal(@"{""number"":0,""bool"":false,""message"":null,""collection"":null,""dictionary"":null}", json);
6565
}
6666

6767
[Fact]
@@ -119,7 +119,8 @@ public void CanSetMaxDepth() {
119119
public void WillIgnoreEmptyCollections() {
120120
var data = new DefaultsModel {
121121
Message = "Testing",
122-
Collection = new Collection<string>()
122+
Collection = new Collection<string>(),
123+
Dictionary = new Dictionary<string, string>()
123124
};
124125
IJsonSerializer serializer = GetSerializer();
125126
string json = serializer.Serialize(data, new[] { nameof(DefaultsModel.Bool), nameof(DefaultsModel.Number) });
@@ -216,6 +217,7 @@ public class DefaultsModel {
216217
public bool Bool { get; set; }
217218
public string Message { get; set; }
218219
public ICollection<string> Collection { get; set; }
220+
public IDictionary<string, string> Dictionary { get; set; }
219221
}
220222

221223
public class User {

0 commit comments

Comments
 (0)