Exemple #1
0
        public void Add()
        {
            var collection = new CommandCollection();

            collection.Add(new PressCommand(Button.Select));

            Assert.AreEqual(1, collection.Count());
        }
Exemple #2
0
        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());
        }
Exemple #3
0
        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());
        }
Exemple #4
0
        public void ConstructorDefault()
        {
            IEnumerable <ICommand> collection = new CommandCollection();

            Assert.AreEqual(0, collection.Count());
        }