public void GivenString_ThenEscapesItWhenNeeded(string input, string expected) { DotHelper dh = new DotHelper(); string result = dh.EscapeId(input); Assert.Equal(expected, result); }
public void GivenString_WhenCheckedQuoted_ThenReturnsProperValues(string input, bool isQuotedProperly) { DotHelper dh = new DotHelper(); bool result = dh.IsProperlyQuoted(input); Assert.Equal(isQuotedProperly, result); }
public void GivenStringAttribute_ThenReturnsProperRecordForIt() { LabelAttribute la = new LabelAttribute("b"); DotHelper dh = new DotHelper(); string record = dh.GetRecordFromAttribute(la); string expected = la.Key + "=b"; Assert.Equal(expected, record); }
public void GivenColorAttribute_ThenReturnsProperRecordForIt() { string hexColor = "#C6C6C6"; IGraphVizColor colorValue = GraphVizColor.FromHex(hexColor); FillColorAttribute fillColorAttribute = new FillColorAttribute(colorValue); DotHelper dh = new DotHelper(); string record = dh.GetRecordFromAttribute(fillColorAttribute); string expected = $"{fillColorAttribute.Key}=\"#C6C6C6\""; Assert.Equal(expected, record); }
public Widget GetWidget(MethodDefinition method) { Digraph digraph = GetIlSourceAsDot(method); Image image = new Image(DotHelper.BuildDotImage(digraph)); ScrolledWindow sw = new ScrolledWindow(); sw.AddWithViewport(image); sw.ShowAll(); return(sw); }
public Widget GetWidget(MethodDefinition method) { BackwardAnalysis(">", null, method); Digraph digraph = BuildDotFile(method); Image image = new Image(DotHelper.BuildDotImage(digraph)); ScrolledWindow sw = new ScrolledWindow(); sw.AddWithViewport(image); sw.ShowAll(); Clear(); return(sw); }
public Widget GetWidget(AssemblyDefinition assembly) { this.assembly = assembly; Digraph digraph = GetDotData(assembly); image = new Image(DotHelper.BuildDotImage(digraph)); AddinScrolledWindow sw = new AddinScrolledWindow(); sw.AddWithViewport(image); sw.ShowAll(); sw.OnRefresh += delegate { Refresh(); }; return(sw); }
public void Refresh() { Digraph digraph = GetDotData(assembly); image.FromFile = DotHelper.BuildDotImage(digraph); }