public void IsNumericType_WhenTypeIsDateTime_ReturnsFalse() { var type = typeof(DateTime); var isNumeric = FieldInfoHelper.IsNumericType(type); Assert.IsFalse(isNumeric); }
public void IsNumericType_WhenTypeIsString_ReturnsFalse() { var type = typeof(string); var isNumeric = FieldInfoHelper.IsNumericType(type); Assert.IsFalse(isNumeric); }
public void IsNumericType_WhenTypeIsNullableUInt64_ReturnsTrue() { var type = typeof(Nullable <UInt64>); var isNumeric = FieldInfoHelper.IsNumericType(type); Assert.IsTrue(isNumeric); }
public void IsNumericType_WhenTypeIsUInt16_ReturnsTrue() { var type = typeof(UInt16); var isNumeric = FieldInfoHelper.IsNumericType(type); Assert.IsTrue(isNumeric); }
public void IsNumericType_WhenTypeIsDecimal_ReturnsTrue() { var type = typeof(Decimal); var isNumeric = FieldInfoHelper.IsNumericType(type); Assert.IsTrue(isNumeric); }
/// <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); }