public void Add() { var collection = new CommandCollection(); collection.Add(new PressCommand(Button.Select)); Assert.AreEqual(1, collection.Count()); }
public void Release() { var collection = new CommandCollection(); collection.Release(Button.Right); collection.Release(Button.Down, TimeSpan.Zero); collection.Release(Button.Down, 0.5); Assert.AreEqual(3, collection.Count()); }
public void Constructor() { var data = new List <ICommand>(); data.Add(new HitCommand(Button.Left)); data.Add(new HitCommand(Button.Up)); data.Add(new HitCommand(Button.A)); var collection = new CommandCollection(data); Assert.AreEqual(3, data.Count); Assert.AreEqual(3, collection.Count()); }
public void ConstructorDefault() { IEnumerable <ICommand> collection = new CommandCollection(); Assert.AreEqual(0, collection.Count()); }