InputCommandsTests CreateDefaultInputCommandsIfContentNotFound Method Delta Engine Documentation

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

public void CreateDefaultInputCommandsIfContentNotFound()
Examples

[Test, CloseAfterFirstFrame, Timeout(5000)]
public void CreateDefaultInputCommandsIfContentNotFound()
{
    var inputCommands = ContentLoader.Load<NotExistingInputCommands>("NotExistingInputCommands");
    inputCommands.InternalCreateDefault();
    foreach (var commandData in inputCommands.Data.Children)
    {
        Assert.IsNotEmpty(commandData.Name);
        Assert.IsNull(commandData.Value);
    }
    var exitCommand = new Command(Command.Exit, (Action)null);
    List<Trigger> triggers = exitCommand.GetTriggers();
    Assert.AreEqual(1, triggers.Count);
    Assert.AreEqual("KeyTrigger", triggers[0].GetShortNameOrFullNameIfNotFound());
}
See Also