private static PartitionedAssemblySet Prepare(IEnumerable<IAssemblyData> assemblies) { var inspector = new AssemblySetInspector(); assemblies = inspector.Filter(assemblies).ToList(); inspector.PreloadReferences(assemblies); return inspector.Partition(assemblies); }
public void TestPartitionSelectsCorrectRoots() { var nodes = new[] { MockAssembly(), MockAssembly(), MockAssembly() }.ToList(); nodes.Add(MockAssembly(nodes[0])); var roots = new[] { MockAssembly(nodes[1], nodes[2]), MockAssembly(nodes[0], nodes[3]) }; var result = new AssemblySetInspector().Partition(roots.Concat(nodes)); Assert.IsTrue(result.Roots.SetEquals(roots)); Assert.IsTrue(result.Other.SetEquals(nodes)); }