LevelTests TestToTextForXml 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 TestToTextForXml()
Examples

[Test, CloseAfterFirstFrame]
public void TestToTextForXml()
{
    var level = new MockLevel(new Size(3, 4));
    level.SetTile(new Vector2D(0, 0), LevelTileType.Nothing);
    level.SetTile(new Vector2D(1, 0), LevelTileType.Blocked);
    level.SetTile(new Vector2D(2, 0), LevelTileType.Placeable);
    level.SetTile(new Vector2D(0, 1), LevelTileType.BlockedPlaceable);
    level.SetTile(new Vector2D(1, 1), LevelTileType.Red);
    level.SetTile(new Vector2D(2, 1), LevelTileType.Green);
    level.SetTile(new Vector2D(0, 2), LevelTileType.Blue);
    level.SetTile(new Vector2D(1, 2), LevelTileType.Yellow);
    level.SetTile(new Vector2D(2, 2), LevelTileType.Brown);
    level.SetTile(new Vector2D(0, 3), LevelTileType.Gray);
    level.SetTile(new Vector2D(1, 3), LevelTileType.SpawnPoint);
    level.SetTile(new Vector2D(2, 3), LevelTileType.ExitPoint);
    string text = level.ToTextForXml();
    Assert.AreEqual("\r\n.XP\r\nLRG\r\nBYO\r\nASE\r\n", text);
}
See Also