public void ApplyTransform_IntField_ExceptionIsThrown()
        {
            var record = new MockRecord()
            {
                IntField = 10
            };
            var property = typeof(MockRecord).GetProperty(nameof(MockRecord.IntField));
            var truncateDecimalAttribute = new TruncateDecimalAttribute();

            truncateDecimalAttribute.ApplyTransform(property, record);
        }
        public void ApplyTransform_DoubleFieldWithFractionalValue_ValueIsTruncated()
        {
            var record = new MockRecord()
            {
                DoubleField = 10.5d
            };
            var property = typeof(MockRecord).GetProperty(nameof(MockRecord.DoubleField));
            var truncateDecimalAttribute = new TruncateDecimalAttribute();

            truncateDecimalAttribute.ApplyTransform(property, record);

            Assert.AreEqual(10d, record.DoubleField);
        }
        public void ApplyTransform_NullableDoubleFieldWithNullValue_ValueIsUnchanged()
        {
            var record = new MockRecord()
            {
                NullableDoubleField = null
            };
            var property = typeof(MockRecord).GetProperty(nameof(MockRecord.NullableDoubleField));
            var truncateDecimalAttribute = new TruncateDecimalAttribute();

            truncateDecimalAttribute.ApplyTransform(property, record);

            Assert.IsNull(record.NullableDoubleField);
        }