public void shouldRemoveEmptyLine() { var lines = setupLines(DateTime.Now.Date.AddDays(-100), DateTime.Now.Date); ILine[] result = new GraphBuilder().RemoveEmptyLines(lines); Assert.That(result.Length, Is.EqualTo(2)); }
public void shouldCreateGraph() { var firstDate = DateTime.Now.AddDays(-24); var lastDate = DateTime.Now; var lines = setupLines(firstDate, lastDate); var graphBuilder = new GraphBuilder(); var graph = graphBuilder.GetGraph(lines); Assert.That(graph.Labels.First().Value, Is.EqualTo(firstDate.ToShortDateString())); Assert.That(graph.Labels.Last().Value, Is.EqualTo(lastDate.ToShortDateString())); Assert.That(graph.LinesContainer.Lines.Length, Is.EqualTo(lines.Length - 1)); }