Exemplo n.º 1
0
        public void SingleCommandHandlerAttributeIsCalledOnce()
        {
            TestableRootWorkItem     item       = new TestableRootWorkItem();
            SingleTestCommandHandler cmdHandler = item.Items.AddNew <SingleTestCommandHandler>();

            item.Commands["TestCommand"].Execute();

            Assert.AreEqual(1, cmdHandler.CommandHandlerCalledCount);
        }
Exemplo n.º 2
0
        public void SingleCommandHandlerAttributeAddsOneCommand()
        {
            TestableRootWorkItem item = new TestableRootWorkItem();
            int cmdCount = item.Commands.Count;

            SingleTestCommandHandler cmdHandler = item.Items.AddNew <SingleTestCommandHandler>();

            Assert.AreEqual(cmdCount + 1, item.Commands.Count);
        }