public void FailedCommitShouldReturnArrayWithLength()
        {
            var commitAction = new GatCommitToVersionControl("", "First Commit 001");
            ArrayList executionActions = commitAction.Execute();

            Assert.IsTrue(executionActions.Count == 6);
        }
        public void CommitShouldPassIfExecutedWithMessageAndDate()
        {
            var commitAction = new GatCommitToVersionControl("20130924", "First Commit 001");
            commitAction.Execute();

            Assert.IsTrue(commitAction.Completed);
        }
        public void SetUp()
        {
            _gatLogs = new GatVersionControlLogs();
            _svmLogs = new SvmLogginSystem();
            _masterControl = new MasterVersionControl(_gatLogs, _svmLogs);
            gatAction = new GatCommitToVersionControl("20130102", "Commiting first");
            svmAction = new SvmVersionControlAction("01012013");
            gatAction2 = new GatCommitToVersionControl("20130130", "Commiting second");

            _svmLogs.AddActionToLog(svmAction);
            _gatLogs.AddActionToLog(gatAction);
            _gatLogs.AddActionToLog(gatAction2);
        }
        public void SuccessfulCommitShouldHaveMessages()
        {
            var correctSuccessMessages = new ArrayList
                {
                    "Logging",
                    "Saving",
                    "Running Gat Commit",
                    "Action Successful",
                    "Action Completed"
                };
            var commitAction = new GatCommitToVersionControl("20130924", "First Commit 001");
            ArrayList executionMessages = commitAction.Execute();

            Assert.IsTrue(haveSameStringsAtSameIndex(correctSuccessMessages, executionMessages));
        }
        public void FailedCommitShouldHaveMessages()
        {
            var correctFailedMessages = new ArrayList
                {
                    "Logging",
                    "Saving",
                    "Running Gat Commit",
                    "Action Failed",
                    "Rolling Back",
                    "State Restored"
                };
            var commitAction = new GatCommitToVersionControl("", "First Commit 001");
            ArrayList executionMessages = commitAction.Execute();

            Assert.IsTrue(haveSameStringsAtSameIndex(correctFailedMessages, executionMessages));
        }
        public void CommitShouldFailIfNotRun()
        {
            var commitAction = new GatCommitToVersionControl("20130924", "First Commit 001");

            Assert.IsFalse(commitAction.Completed);
        }