public void TestConflictNoMeta() { MountPointWithPath rootMountPointWithPath = BuildRootMountPointWithPath(); GluonFileConflict fileConflict = Build.FileConflict( rootMountPointWithPath, "/foo/bar.c"); CheckedStateManager checkedStateManager = new CheckedStateManager(); List <OutOfDateItemsByMount> outOfDateItemsByMount = new List <OutOfDateItemsByMount>(); List <GluonFileConflict> fileConflicts = new List <GluonFileConflict>(); fileConflicts.Add(fileConflict); IncomingChangesTree innerTree = IncomingChangesTree.BuildIncomingChangeCategories( checkedStateManager, outOfDateItemsByMount, fileConflicts); UnityIncomingChangesTree tree = UnityIncomingChangesTree.BuildIncomingChangeCategories(innerTree); IncomingChangeInfo conflictChangeInfo = FindChangeInfo.FromFileConflict( fileConflict, tree); Assert.IsNotNull( conflictChangeInfo, "ChangeInfo not found"); Assert.IsNull( tree.GetMetaChange(conflictChangeInfo), "Meta change should be null"); }
internal static IncomingChangeInfo FromFileConflict( GluonFileConflict fileConflict, UnityIncomingChangesTree tree) { foreach (IncomingChangeCategory category in tree.GetNodes()) { foreach (IncomingChangeInfo changeInfo in category.GetChanges()) { if (changeInfo.CategoryType != IncomingChangeCategory.Type.Conflicted) { continue; } if (changeInfo.GetPath() != fileConflict.CmPath) { continue; } return(changeInfo); } } return(null); }