[TestMethod] // ReSharper disable once InconsistentNaming
        public void ToString_HasCorrectFormat()
        {
            Period length = RandomPeriod(MinPeriod + MinPeriod, MaxPeriod, true, false);
            LocalDate start = RandomLocalDate(MinLocalDate, MaxLocalDate - length);
            LocalDate end = start + length;
            Period step = RandomPeriod(MinPeriod, length - MinPeriod, true, false);

            LocalDateRange localRange = new LocalDateRange(start, end, step);

            Assert.AreEqual($"{start} - {end}", localRange.ToString());
        }
Exemple #2
0
        [TestMethod] // ReSharper disable once InconsistentNaming
        public void ToString_HasCorrectFormat()
        {
            Period    length = RandomPeriod(MinPeriod + MinPeriod, MaxPeriod, true, false);
            LocalDate start  = RandomLocalDate(MinLocalDate, MaxLocalDate - length);
            LocalDate end    = start + length;
            Period    step   = RandomPeriod(MinPeriod, length - MinPeriod, true, false);

            LocalDateRange localRange = new LocalDateRange(start, end, step);

            Assert.AreEqual($"{start} - {end}", localRange.ToString());
        }
        [TestMethod] // ReSharper disable once InconsistentNaming
        public void ToString_IsNotBlank()
        {
            Period length = RandomPeriod(MinPeriod + MinPeriod, MaxPeriod, true, false);
            LocalDate start = RandomLocalDate(MinLocalDate, MaxLocalDate - length);
            LocalDate end = start + length;
            Period step = RandomPeriod(MinPeriod, length - MinPeriod, true, false);

            LocalDateRange localRange = new LocalDateRange(start, end, step);

            Assert.AreNotEqual(
                "",
                localRange.ToString(),
                "String representation of range must not be an empty string");
        }
Exemple #4
0
        [TestMethod] // ReSharper disable once InconsistentNaming
        public void ToString_IsNotBlank()
        {
            Period    length = RandomPeriod(MinPeriod + MinPeriod, MaxPeriod, true, false);
            LocalDate start  = RandomLocalDate(MinLocalDate, MaxLocalDate - length);
            LocalDate end    = start + length;
            Period    step   = RandomPeriod(MinPeriod, length - MinPeriod, true, false);

            LocalDateRange localRange = new LocalDateRange(start, end, step);

            Assert.AreNotEqual(
                "",
                localRange.ToString(),
                "String representation of range must not be an empty string");
        }