public void LoadFileImage_ImageHasOnlyRoot_CreatesRootNode() { // Arrange var fileImageLines = new string[] { "1,\"Root\",0" }; var fileSystemSerializer = new FileSystemSerializer(); // Act var result = fileSystemSerializer.Deserialize(fileImageLines); // Assert Assert.AreEqual("Root", result.Name); Assert.AreEqual(0, result.ChildCount); }
public void LoadFileImage_ImageHasRootWithChild_CreatesRootAndChildNode() { // Arrange var fileImageLines = new string[] { "1,\"Root\",1", "0,\"Test\"" }; var fileSystemSerializer = new FileSystemSerializer(); // Act var result = fileSystemSerializer.Deserialize(fileImageLines); // Assert Assert.AreEqual("Root", result.Name); Assert.AreEqual(1, result.ChildCount); var child = result.First <INode>(); Assert.AreEqual("Test", child.Name); }