Ejemplo n.º 1
0
        public void DataTypes_Timex_FromDateTimeRange_ToString()
        {
            // TODO: This test documents a workaround to avoid exceptions when calling TimexProperty.ToString(). Proper fix for date range representation is needed.
            var timex = new TimexProperty("(2022-03-15T16,2022-03-15T18,PT2H)");

            Assert.AreEqual("15th March 2022 4PM", timex.ToString());
        }
Ejemplo n.º 2
0
        public void DataTypes_Timex_FromDateTime_ToString()
        {
            var timex = new TimexProperty("2022-03-11");

            Assert.AreEqual("11th March 2022", timex.ToString());
            timex = new TimexProperty("2022-03-12");
            Assert.AreEqual("12th March 2022", timex.ToString());
            timex = new TimexProperty("2022-03-13");
            Assert.AreEqual("13th March 2022", timex.ToString());
        }