コード例 #1
0
        public void NotCurrentConflictTest()
        {
            long         itemId       = 55;
            MountPointId mountPointId = MountPointId.WORKSPACE_ROOT;

            MergeChangeInfo          changeInfo          = BuildChangeInfo(mountPointId, itemId);
            MergeSolvedFileConflicts solvedFileConflicts = new MergeSolvedFileConflicts();

            Assert.IsFalse(
                IsCurrent.Conflict(changeInfo, null, solvedFileConflicts),
                "Should return false");
        }
コード例 #2
0
ファイル: IsCurrentTests.cs プロジェクト: Buster-00/Q_G
        public void NotCurrentConflictWithMeta()
        {
            long itemId     = 55;
            long metaItemId = 66;

            MountPointId mountPointId = MountPointId.WORKSPACE_ROOT;

            IncomingChangeInfo changeInfo     = BuildChangeInfo(mountPointId, itemId);
            IncomingChangeInfo metaChangeInfo = BuildChangeInfo(mountPointId, metaItemId);

            MergeSolvedFileConflicts solvedFileConflicts = new MergeSolvedFileConflicts();

            Assert.IsFalse(
                IsCurrent.Conflict(changeInfo, metaChangeInfo, solvedFileConflicts),
                "Should return false");
        }
コード例 #3
0
        public void CurrentConflictTest()
        {
            long         itemId       = 55;
            MountPointId mountPointId = MountPointId.WORKSPACE_ROOT;

            MergeChangeInfo          changeInfo          = BuildChangeInfo(mountPointId, itemId);
            MergeSolvedFileConflicts solvedFileConflicts = new MergeSolvedFileConflicts();

            MergeSolvedFileConflicts.CurrentConflict currentConflict = new MergeSolvedFileConflicts.CurrentConflict(
                mountPointId, itemId, 0);

            solvedFileConflicts.SetCurrentConflict(currentConflict);

            Assert.IsTrue(
                IsCurrent.Conflict(changeInfo, null, solvedFileConflicts),
                "Should return true");
        }
コード例 #4
0
        public void CurrentConflictWithMetaCurrentIsNotTheMeta()
        {
            long itemId     = 55;
            long metaItemId = 66;

            MountPointId mountPointId = MountPointId.WORKSPACE_ROOT;

            MergeChangeInfo changeInfo     = BuildChangeInfo(mountPointId, itemId);
            MergeChangeInfo metaChangeInfo = BuildChangeInfo(mountPointId, metaItemId);

            MergeSolvedFileConflicts solvedFileConflicts = new MergeSolvedFileConflicts();

            MergeSolvedFileConflicts.CurrentConflict currentConflict = new MergeSolvedFileConflicts.CurrentConflict(
                mountPointId, itemId, 0);

            solvedFileConflicts.SetCurrentConflict(currentConflict);

            Assert.IsTrue(
                IsCurrent.Conflict(changeInfo, metaChangeInfo, solvedFileConflicts),
                "Should return true");
        }
コード例 #5
0
 public void NullValuesTest()
 {
     Assert.IsFalse(
         IsCurrent.Conflict(null, null, null),
         "Null values should return false");
 }