public void TimeSeriesComparisonGraphNumericalWithMissingValuesTest()
        {
            var expected  = new TimeSeries();
            var timestamp = DateTime.Parse("2000-11-24", CultureInfo.InvariantCulture);

            expected.AddMeasurement(new Measurement
            {
                Timestamp = timestamp,
                Value     = "1"
            });
            expected.AddMeasurement(new Measurement
            {
                Timestamp = timestamp.Date.AddSeconds(1),
                Value     = "2"
            });
            var actual = new TimeSeries();

            actual.AddMeasurement(new Measurement
            {
                Timestamp = timestamp,
                Value     = "1"
            });
            actual.AddMeasurement(new Measurement
            {
                Timestamp = timestamp.Date.AddSeconds(2),
                Value     = "-1"
            });
            var timeSeriesComparison = new TimeSeriesComparison(expected, actual);
            var result = timeSeriesComparison.GraphX(480, 320);

            TimeSeriesChartTest.AssertChartImage(result, MissingValuesFile, nameof(TimeSeriesComparisonGraphNumericalWithMissingValuesTest));
        }
        public void TimeSeriesComparisonGraphSimpleNumericalTest()
        {
            var expected  = new TimeSeries();
            var timestamp = DateTime.Parse("2000-11-24", CultureInfo.InvariantCulture);

            expected.AddMeasurement(new Measurement
            {
                Timestamp = timestamp,
                Value     = "1"
            });
            expected.AddMeasurement(new Measurement
            {
                Timestamp = timestamp.Date.AddSeconds(1),
                Value     = "2"
            });
            var timeseriesComparison = new TimeSeriesComparison(expected, expected);
            var result = timeseriesComparison.GraphX(320, 200);

            TimeSeriesChartTest.AssertChartImage(result, SimpleResultFile, nameof(TimeSeriesComparisonGraphSimpleNumericalTest));
            var parameters = new Dictionary <string, string> {
                { "start timestamp", "2004-03-24" }
            };
            var result2 = timeseriesComparison.Graph(parameters);

            Assert.AreEqual("no data", result2);
        }
        public void TimeSeriesComparisonGraphNumericalAllBelowXAxisTest()
        {
            var expected  = new TimeSeries();
            var timestamp = DateTime.Parse("1969-08-28", CultureInfo.InvariantCulture);

            expected.AddMeasurement(new Measurement
            {
                Timestamp = timestamp,
                Value     = "-1.2"
            });
            expected.AddMeasurement(new Measurement
            {
                Timestamp = timestamp.Date.AddSeconds(1),
                Value     = "-2.3"
            });
            var actual = new TimeSeries();

            actual.AddMeasurement(new Measurement
            {
                Timestamp = timestamp,
                Value     = "-1.2"
            });
            actual.AddMeasurement(new Measurement
            {
                Timestamp = timestamp.Date.AddSeconds(2),
                Value     = "-2.6"
            });
            var timeseriesComparison = new TimeSeriesComparison(expected, actual);
            var result = timeseriesComparison.GraphX(640, 480);

            TimeSeriesChartTest.AssertChartImage(result, AllBelowXAxisFile, nameof(TimeSeriesComparisonGraphNumericalAllBelowXAxisTest));
        }