Пример #1
0
        public void GetDecimalValue_TooManyDecimals_DecimalIsTrimmed()
        {
            const decimal validSize = 124.99543m;

            string result = BaseTypeHelper.GetDecimalValue(validSize);

            Assert.Equal("124.9954", result);
        }
Пример #2
0
        public void GetDecimalValue_SizeIsAcceptable_ReturnsSize()
        {
            const decimal validSize = 124.99m;

            string result = BaseTypeHelper.GetDecimalValue(validSize);

            Assert.Equal("124.9900", result);
        }
Пример #3
0
        public void GetDecimalValue_SizeExceedsMax_ReturnsMaxAllowedValue()
        {
            const string  maxZabbixMySqlValue = "999000000000.0000";
            const decimal exceedsMaxSize      = 999999999999.9999m;

            string result = BaseTypeHelper.GetDecimalValue(exceedsMaxSize);

            Assert.Equal(maxZabbixMySqlValue, result);
        }