public void It_should_throw_an_exception_when_the_type_is_not_a_numeric_type()
        {
            _DataTable.Rows.Add("Value-1", "Value-2");

            var exception = Assert.Throws <ArgumentException>(() => SumAggregation.Sum <DateTime>(_DataTable, ((0, 0), (0, 0))));

            Assert.AreEqual("The specified type is not a numeric type.", exception.Message);
        }
        public void It_should_throw_an_exception_when_the_range_tuple_does_not_specify_the_same_column()
        {
            _DataTable.Rows.Add("Value-1", "Value-2");

            var exception = Assert.Throws <ArgumentException>(() => SumAggregation.Sum <int>(_DataTable, ((0, 0), (1, 0))));

            Assert.AreEqual("The specified aggregation can only be performed on a single column.", exception.Message);
        }
        public void It_should_throw_an_exception_when_the_table_parameter_is_null()
        {
            var exception = Assert.Throws <ArgumentNullException>(() => SumAggregation.Sum <int>(null, "A1:A1"));

            Assert.AreEqual($"Value cannot be null. (Parameter 'table')", exception.Message);
        }
        public void It_should_throw_an_exception_when_the_range_parameter_is_null()
        {
            var exception = Assert.Throws <ArgumentNullException>(() => SumAggregation.Sum <int>(_DataTable, string.Empty));

            Assert.AreEqual($"Value cannot be null. (Parameter 'range')", exception.Message);
        }
        public void It_should_throw_an_exception_when_the_data_row_groupings_parameter_is_null()
        {
            var exception = Assert.Throws <ArgumentNullException>(() => SumAggregation.Sum <int>(null, 0));

            Assert.AreEqual($"Value cannot be null. (Parameter 'dataRowGroupings')", exception.Message);
        }