public void Should_create_a_file() { var generator = new ChannelGraphGenerator(); string filename = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "graph.png"); generator.SaveGraphToFile(_channel, 2560, 1920, filename); }
protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider) { try { var data = (ChannelGraphData)objectProvider.GetObject(); Graph graph = new ChannelGraphGenerator().CreateGraph(data); using (var form = new GraphVisualizerForm(graph, "Channel Visualizer")) windowService.ShowDialog(form); } catch (InvalidCastException) { MessageBox.Show("The selected data is not of a type compatible with this visualizer.", GetType().ToString()); } }