public void DiagramService_SetChartData_Test() { // Create new DiagramService and Test-Data DiagramService diagramservice = new DiagramService(); var testdata = new List <KeyValuePair <int, string> >() { new KeyValuePair <int, string>(1, "test") }; // Execute SetChartData Function diagramservice.SetChartData <int, string>(testdata, DiagramType.LINE); // Check if a new Diagram was created and a DataSeries was added Assert.IsNotNull(diagramservice.Diagram); Assert.IsNotNull(diagramservice.Diagram.Series); }