Example #1
0
        private IEnumerable<string> NodeAndEdgesFor(Azzembly azzembly)
        {
            if (!azzembly.HasDependencies())
                yield return NodeOnlyFor(azzembly);

            foreach (var dependency in azzembly.Dependencies)
            {
                yield return NodeAndEdgeFor(azzembly, dependency);
            }
        }
Example #2
0
 public void ShouldRenderAssemblyWithoutDependencies()
 {
     var azzembly = new Azzembly("Foo");
     Assert.That(Render(azzembly), DigraphContaining("Foo"));
 }
Example #3
0
 public void ShouldRenderAssemblyWithOneDependency()
 {
     var azzembly = new Azzembly("Foo").WithDependencies("Bar");
     Assert.That(Render(azzembly), DigraphContaining("Foo", "Bar"));
 }
Example #4
0
 private string NodeOnlyFor(Azzembly azzembly)
 {
     return WrapInQuotes(azzembly.Name);
 }
Example #5
0
 private string NodeAndEdgeFor(Azzembly azzembly, Azzembly dependency)
 {
     return string.Format("{0} -> {1}", WrapInQuotes(azzembly.Name), WrapInQuotes(dependency.Name));
 }
Example #6
0
 private void EntriesFor(Azzembly azzembly)
 {
     NodeAndEdgesFor(azzembly).ToList().ForEach(line => writer.WriteLine("{0}{1}", INDENT, line));
 }