Exemplo n.º 1
0
        public void IsFileConflictWithMetaResolved()
        {
            long itemId     = 55;
            long metaItemId = 66;

            MountPointId mountPointId = MountPointId.WORKSPACE_ROOT;

            MergeChangeInfo fileConflict     = BuildFileConflict(mountPointId, itemId);
            MergeChangeInfo metaFileConflict = BuildFileConflict(mountPointId, metaItemId);

            MergeSolvedFileConflicts solvedFileConflicts = new MergeSolvedFileConflicts();

            solvedFileConflicts.AddResolveFile(mountPointId, itemId, "foo.c");
            solvedFileConflicts.AddResolveFile(mountPointId, metaItemId, "foo.c.meta");

            Assert.IsTrue(
                IsSolved.Conflict(fileConflict, metaFileConflict, solvedFileConflicts),
                "Conflict should be resolved");
        }
Exemplo n.º 2
0
        public void IsFileConflictResolved()
        {
            long         itemId       = 55;
            MountPointId mountPointId = MountPointId.WORKSPACE_ROOT;

            IncomingChangeInfo fileConflict = BuildFileConflict(mountPointId, itemId);

            MergeSolvedFileConflicts solvedFileConflicts = new MergeSolvedFileConflicts();

            solvedFileConflicts.AddResolveFile(mountPointId, itemId, "foo.c");

            Assert.IsTrue(
                IsSolved.Conflict(fileConflict, null, solvedFileConflicts),
                "Conflict should be resolved");
        }
Exemplo n.º 3
0
        public void IsFileDirectoryConflictWithMetaNotResolved()
        {
            long itemId     = 55;
            long metaItemId = 66;

            MountPointId mountPointId = MountPointId.WORKSPACE_ROOT;

            IncomingChangeInfo fileConflict     = BuildFileConflict(mountPointId, itemId);
            IncomingChangeInfo metaFileConflict = BuildFileConflict(mountPointId, metaItemId);

            MergeSolvedFileConflicts solvedFileConflicts = new MergeSolvedFileConflicts();

            solvedFileConflicts.AddResolveFile(mountPointId, itemId, "foo.c");

            Assert.IsFalse(
                IsSolved.Conflict(fileConflict, metaFileConflict, solvedFileConflicts),
                "Conflict shouldn't be resolved");
        }