public void ItShould_Handle_Null()
        {
            var factory = new HistoryCommandFactory <FakeCommand>(null, null);

            var command = factory.CreateCommand();

            Assert.NotNull(command);
            Assert.IsType <FakeCommand>(command);
        }
        public void ItShould_Create_Command()
        {
            var factory = new HistoryCommandFactory <FakeCommand2>(_documentHistoryCommandsMock.Object, _documentCommandFactoryMock.Object);

            var command = factory.CreateCommand();

            Assert.NotNull(command);
            Assert.IsType <FakeCommand2>(command);
            Assert.Equal((command as FakeCommand2).DocumentHistoryCommands, _documentHistoryCommandsMock.Object);
            Assert.Equal((command as FakeCommand2).DocumentCommandFactory, _documentCommandFactoryMock.Object);
        }
        public void ItShould_Create_Command_With_Documents()
        {
            var factory = new HistoryCommandFactory <FakeCommand2>(_documentHistoryCommandsMock.Object, _documentCommandFactoryMock.Object);

            var docs = new IClosedDocument[]
            {
                NullDocument.Instance
            };

            var command = factory.CreateCommand(docs);

            Assert.NotNull(command);
            Assert.IsType <FakeCommand2>(command);
            Assert.Equal((command as FakeCommand2).ClosedDocuments, docs);
        }