Created
April 17, 2015 13:25
-
-
Save rarous/f2e34f0abdd299ab256f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
[Test] | |
public void ShouldRoundtripSerialization() { | |
var config1 = new FsAgentSpecificConfiguration { DropPath = "test" }; | |
FsAgentSpecificConfiguration config2; | |
using (var ms = new MemoryStream()) { | |
var serializer = new XmlSerializer(typeof(FsAgentSpecificConfiguration)); | |
serializer.Serialize(ms, config1); | |
ms.Position = 0; | |
config2 = (FsAgentSpecificConfiguration)serializer.Deserialize(ms); | |
} | |
Assert.AreEqual(config1, config2); | |
} |
This file contains hidden or 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
[Test] | |
public void ShouldRoundtripSerialization() { | |
var config = new FsAgentSpecificConfiguration { DropPath = "test" }; | |
Assert.AreEqual(config, Deserialize(Serialize(config))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment