Example #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");
        }
Example #2
0
        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");
        }
Example #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");
        }
Example #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");
        }
Example #5
0
 public void NullValuesTest()
 {
     Assert.IsFalse(
         IsCurrent.Conflict(null, null, null),
         "Null values should return false");
 }