Ejemplo n.º 1
0
		public void CreateDefaultInputCommandsIfContentNotFound()
		{
			var inputCommands = ContentLoader.Load<NotExistingInputCommands>("NotExistingInputCommands");
			inputCommands.InternalCreateDefault();
			var exitCommand = new Command(Command.Exit, (Action)null);
			List<Trigger> triggers = exitCommand.GetTriggers();
			Assert.AreEqual(1, triggers.Count);
			Assert.AreEqual("KeyTrigger", triggers[0].GetShortNameOrFullNameIfNotFound());
		}
Ejemplo n.º 2
0
		public void RegisterCommandWithSeveralTriggers()
		{
			const string CommandName = "CommandWithSeveralTriggers";
			var trigger1 = new MockTrigger();
			var trigger2 = new MockTrigger();
			Command.Register(CommandName, trigger1, trigger2);
			var command = new Command(CommandName, (Action)null);
			Assert.AreEqual(2, command.GetTriggers().Count);
		}