Пример #1
0
        public void GetDoubleValue_SizeIsAcceptable_ReturnsSize()
        {
            const double validSize = 124.99D;

            string result = BaseTypeHelper.GetDoubleValue(validSize);

            Assert.Equal("124.9900", result);
        }
Пример #2
0
        public void GetDoubleValue_TooManyDecimals_DecimalIsTrimmed()
        {
            const double validSize = 124.99543D;

            string result = BaseTypeHelper.GetDoubleValue(validSize);

            Assert.Equal("124.9954", result);
        }
Пример #3
0
        public void GetDoubleValue_SizeExceedsMin_ReturnsMinAllowedValue()
        {
            const string minZabbixMySqlValue = "-999000000000.0000";
            const double exceedsMinSize      = -999999999999.9999D;

            string result = BaseTypeHelper.GetDoubleValue(exceedsMinSize);

            Assert.Equal(minZabbixMySqlValue, result);
        }