public void MoveCommit_ToItself()
        {
            var streams = new BranchStreamCollection(m_commits, m_branchpoints);

            streams.MoveCommit(m_commits[2], m_commits[2]);

            Assert.IsTrue(streams["MAIN"].ToList().SequenceEqual(m_commits[0], m_commits[2]));
            Assert.IsTrue(streams.Verify());
        }
        public void MoveCommit_FromStart()
        {
            m_commits.Add(new Commit("4").WithRevision(m_f1, "1.1.2.2"));
            m_commits.Add(new Commit("5").WithRevision(m_f1, "1.1.2.3"));
            var streams = new BranchStreamCollection(m_commits, m_branchpoints);

            streams.MoveCommit(m_commits[1], m_commits[4]);

            Assert.IsTrue(streams["branch"].CommitId == "4");
            Assert.IsTrue(streams["branch"].ToList().Select(c => c.CommitId).SequenceEqual("4", "5", "2"));
            Assert.IsTrue(streams.Verify());
        }
        public void MoveCommit_ToEnd()
        {
            m_commits.Add(new Commit("4").WithRevision(m_f1, "1.3"));
            m_commits.Add(new Commit("5").WithRevision(m_f1, "1.4"));
            var streams = new BranchStreamCollection(m_commits, m_branchpoints);

            streams.MoveCommit(m_commits[3], m_commits[4]);

            Assert.IsTrue(streams["MAIN"].ToList().Select(c => c.CommitId).SequenceEqual("1", "3", "5", "4"));
            Assert.IsTrue(streams.Head("MAIN").CommitId == "4");
            Assert.IsTrue(streams.Verify());
        }
        public void MoveCommit_Backwards()
        {
            var streams = new BranchStreamCollection(m_commits, m_branchpoints);

            streams.MoveCommit(m_commits[2], m_commits[1]);
        }