Skip to content

Commit

Permalink
Add failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
bording committed May 7, 2018
1 parent 41cfcf5 commit 142a0c1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/NServiceBus.Core.Tests/Serializers/SimpleJsonTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,25 @@ public void TestStringObjectDictionary()
Assert.AreEqual(input["obj2"].String, result["obj2"].String);
}

[Test]
public void TestDateTimeIntDictionary()
{
var date1 = new DateTime(2018, 1, 1);
var date2 = new DateTime(2017, 1, 1);

var input = new Dictionary<DateTime, int>()
{
{date1, 1},
{date2, 2}
};
var json = SimpleJson.SerializeObject(input);
var result = SimpleJson.DeserializeObject<Dictionary<DateTime, int>>(json);

Assert.AreEqual(2, result.Count);
Assert.AreEqual(1, result[date1]);
Assert.AreEqual(2, result[date2]);
}

[Test]
public void TestPocoClass()
{
Expand Down

0 comments on commit 142a0c1

Please sign in to comment.