コード例 #1
0
        public void Should_return_min_upload_value()
        {
            var values = this.GetValues();

            var converter = new ChartStatisticsValueConverter();
            var result = (double)converter.Convert(values, typeof(double), ChartStatisticsValueConverter.MinUpload, CultureInfo.InvariantCulture);

            Assert.AreEqual(1, result);
        }
コード例 #2
0
        public void Should_return_max_upload_value()
        {
            List<MonthlyValue> values = GetValues();

            var converter = new ChartStatisticsValueConverter();
            var result = (double)converter.Convert(values, typeof(double), ChartStatisticsValueConverter.MaxUpload, CultureInfo.InvariantCulture);

            Assert.AreEqual(3, result);
        }
コード例 #3
0
        public void Should_return_sum_of_downloads()
        {
            var values = this.GetValues();

            var converter = new ChartStatisticsValueConverter();
            var result = (double)converter.Convert(values, typeof(double), ChartStatisticsValueConverter.SumDownload, CultureInfo.InvariantCulture);

            Assert.AreEqual(180, result);
        }