public void GeneratesXDocument() { DirectedGraph graph = new DirectedGraph(); graph.Nodes = new[] { new DirectedGraphNode(), }; var document = graph.AsXDocument(); Assert.Equal(1, document.Root.Elements().Count()); }
/// <summary> /// Initializes a new instance of the <see cref="PackageUpgradeVisualizer"/> class. /// </summary> /// <param name="directedGraph">The directed graph used to visualize package upgrades.</param> /// <param name="palette">The color palette to color nodes and links.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="directedGraph"/> is <c>null</c>. /// - or - /// <paramref name="palette"/> is <c>null</c>. /// </exception> public PackageUpgradeVisualizer(DirectedGraph directedGraph, PackageUpgradePalette palette) { if (directedGraph == null) { throw new ArgumentNullException(nameof(directedGraph)); } if (palette == null) { throw new ArgumentNullException(nameof(palette)); } _directedGraph = directedGraph; _palette = palette; }
public Visualize() { _directedGraph = new DirectedGraph(); _visualizer = new PackageUpgradeVisualizer(_directedGraph); }
public void ThrowsOnNullPackageUpgradePalette() { var directedGraph = new DirectedGraph(); Assert.Throws<ArgumentNullException>("palette", () => new PackageUpgradeVisualizer(directedGraph, null)); }
public CreateDependencyGraph() { _directedGraph = Factory.CreateDependencyGraph(); }
/// <summary> /// Initializes a new instance of the <see cref="PackageUpgradeVisualizer"/> class. /// </summary> /// <param name="directedGraph">The directed graph used to visualize package upgrades.</param> /// <exception cref="ArgumentNullException"><paramref name="directedGraph"/> is <c>null</c>.</exception> public PackageUpgradeVisualizer(DirectedGraph directedGraph) : this(directedGraph, new PackageUpgradePalette()) { }