LevelTests SaveAndLoadMapData Method Delta Engine Documentation

Namespace: DeltaEngine.GameLogic.Tests
Assembly: DeltaEngine.GameLogic.Tests (in DeltaEngine.GameLogic.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void SaveAndLoadMapData()
Examples

[Test, CloseAfterFirstFrame]
public void SaveAndLoadMapData()
{
    TileMap map = CreateSimple2X3TileMap();
    string mapData = map.Save();
    string newLine = Environment.NewLine;
    string expectedData = "E." + newLine + "X." + newLine + "S." + newLine;
    Assert.AreEqual(expectedData, mapData);
    var loadedMap = new TileMap(mapData);
    Assert.AreEqual(expectedData, loadedMap.Save());
}
See Also