예제 #1
0
        public void Can_add_assembly()
        {
            _graph.AddAssembly(_assembly1);

            _graph.GetAssemblies().Should().Have.Count.EqualTo(1);
            _graph.ContainsAssembly(_assembly1).Should().Be.True();
            _graph.GetAssemblies().Should().Contain(_assembly1);
        }
        public void BuildAssemblyDependencyGraph_creates_a_graph_of_all_dependencies()
        {
            _graphBuilder.AddAssemblyAndAllDependencies(_testAssembly);
            AssemblyDependencyGraph graph = _graphBuilder.BuildAssemblyDependencyGraph();

            graph.GetAssemblies().Should().Have.Count.EqualTo(5);             // 5 non-System assemblies
            graph.GetAssemblies().Single(o => o.GetName().Name == "nunit.framework");
            graph.GetAssemblies().Single(o => o.GetName().Name == "Inspector.Engine");
        }