コード例 #1
0
        public void FailedCommitShouldReturnArrayWithLength()
        {
            var commitAction = new GatCommitToVersionControl("", "First Commit 001");
            ArrayList executionActions = commitAction.Execute();

            Assert.IsTrue(executionActions.Count == 6);
        }
コード例 #2
0
        public void CommitShouldPassIfExecutedWithMessageAndDate()
        {
            var commitAction = new GatCommitToVersionControl("20130924", "First Commit 001");
            commitAction.Execute();

            Assert.IsTrue(commitAction.Completed);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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));
        }
コード例 #5
0
        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));
        }
コード例 #6
0
        public void CommitShouldFailIfNotRun()
        {
            var commitAction = new GatCommitToVersionControl("20130924", "First Commit 001");

            Assert.IsFalse(commitAction.Completed);
        }