Exemplo n.º 1
0
        public void TestChainOfCommandFails(List <ICommand <MyContext> > commands, int visitedCount)
        {
            MyContext context            = new MyContext();
            ChainOfCommand <MyContext> c = new ChainOfCommand <MyContext>(commands);

            Assert.AreEqual(IResult.Failed, c.Execute(context));
            Assert.AreEqual(visitedCount, context.accessed.Count);
        }
Exemplo n.º 2
0
        public void TestChainOfCommandFailsNullContext(List <ICommand <MyContext> > commands, int visitedCount)
        {
            ChainOfCommand <MyContext> c = new ChainOfCommand <MyContext>(commands);

            Assert.AreEqual(IResult.Failed, c.Execute(null));
        }