Created
September 29, 2016 20:45
-
-
Save kmorcinek/39926c6a7e8709c7c8ad634c542ed53c to your computer and use it in GitHub Desktop.
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
using Newtonsoft.Json; | |
using Xunit; | |
[Fact] | |
public void SerializationTest() | |
{ | |
var money = Money.Create(1, "USD"); | |
string json = JsonConvert.SerializeObject(money); | |
Money result = JsonConvert.DeserializeObject<Money>(json); | |
Assert.Equal(money.Currency, result.Currency); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment