public void GenerateGraphImage_withSimpleProject_returnsImage() { var project = CreateProject( "sample", CreateTarget("build", "clean compile"), CreateTarget("clean"), CreateTarget("compile")); var generator = new GraphGenerator(CreateProjectList(project), CreateNodeGenerator(), CreateEdgeGenerator()); var graph = generator.GenerateGraphImage(); Assert.That(graph, Is.Not.Null); }
public void GenerateGraphImage_withSimpleProject_returnsImage() { var project = CreateProject( "sample", CreateTarget("build", "clean compile"), CreateTarget("clean"), CreateTarget("compile")); var generator = new GraphGenerator(CreateProjectList(project), CreateNodeGenerator(), CreateEdgeGenerator()); var graph = generator.GenerateGraphImage(); Assert.That(graph, Is.Not.Null); }
/// <summary> /// Render a graph for the passed NAntProjects /// </summary> /// <param name="projects">Sequence of projects to render</param> /// <returns>Generated image</returns> public Image Render(IEnumerable<NAntProject> projects) { var nodeGenerator = new NodeGenerator { IncludeDescriptions = mIncludeDescriptions, LabelFont = mLabelFont, LabelFontSize = mLabelFontSize }; var edgeGenerator = new EdgeGenerator(); var generator = new GraphGenerator(projects, nodeGenerator, edgeGenerator); mImage = generator.GenerateGraphImage(); mDotScript = generator.DotText; return Image; }