Exemple #1
0
        public void GivenAStringWithTrailingZero_WhenParsed_ThenTrailingZeroShouldBePreserved()
        {
            string expected = "0.010";

            NumberSearchValue value = NumberSearchValue.Parse(expected);

            Assert.NotNull(value);
            Assert.Equal(0.010m, value.Number);
            Assert.Equal(expected, value.ToString());
        }
Exemple #2
0
        public void GivenASearchValueWithUnequalLowAndHighValues_WhenToStringIsCalled_ThenCorrectStringShouldBeReturned()
        {
            NumberSearchValue value = new NumberSearchValue(23.56m, 27);

            Assert.Equal("[23.56, 27)", value.ToString());
        }
Exemple #3
0
        public void GivenASearchValue_WhenToStringIsCalled_ThenCorrectStringShouldBeReturned()
        {
            NumberSearchValue value = new NumberSearchValue(23.56m);

            Assert.Equal("23.56", value.ToString());
        }