Beispiel #1
0
        public void IsNumericType_WhenTypeIsDateTime_ReturnsFalse()
        {
            var type = typeof(DateTime);

            var isNumeric = FieldInfoHelper.IsNumericType(type);

            Assert.IsFalse(isNumeric);
        }
Beispiel #2
0
        public void IsNumericType_WhenTypeIsString_ReturnsFalse()
        {
            var type = typeof(string);

            var isNumeric = FieldInfoHelper.IsNumericType(type);

            Assert.IsFalse(isNumeric);
        }
Beispiel #3
0
        public void IsNumericType_WhenTypeIsNullableUInt64_ReturnsTrue()
        {
            var type = typeof(Nullable <UInt64>);

            var isNumeric = FieldInfoHelper.IsNumericType(type);

            Assert.IsTrue(isNumeric);
        }
Beispiel #4
0
        public void IsNumericType_WhenTypeIsUInt16_ReturnsTrue()
        {
            var type = typeof(UInt16);

            var isNumeric = FieldInfoHelper.IsNumericType(type);

            Assert.IsTrue(isNumeric);
        }
Beispiel #5
0
        public void IsNumericType_WhenTypeIsDecimal_ReturnsTrue()
        {
            var type = typeof(Decimal);

            var isNumeric = FieldInfoHelper.IsNumericType(type);

            Assert.IsTrue(isNumeric);
        }
Beispiel #6
0
        /// <inheritdoc />
        internal override IAggregateDescription GetAggregateDescriptionForFieldDescription(IDataFieldInfo description)
        {
            if (description == null)
            {
                throw new ArgumentNullException(nameof(description));
            }

            var aggregateDescription = new PropertyAggregateDescription()
            {
                PropertyName = description.Name
            };

            if (!FieldInfoHelper.IsNumericType(description.DataType))
            {
                ////aggregateDescription.AggregateFunction = AggregateFunctions.Count;
            }

            return(aggregateDescription);
        }