Beispiel #1
0
        public void DataTypes_DateHelpers_dateOfLastDay_Friday_last_week()
        {
            var day  = DayOfWeek.Friday;
            var date = new System.DateTime(2017, 9, 28);

            Assert.IsTrue(TimexDateHelpers.DatePartEquals(TimexDateHelpers.DateOfLastDay(day, date), new System.DateTime(2017, 9, 22)));
        }
Beispiel #2
0
        public void DataTypes_Creator_lastWeek()
        {
            var start = TimexDateHelpers.DateOfLastDay(DayOfWeek.Monday, System.DateTime.Now);

            start = start.AddDays(-7);
            var t = TimexProperty.FromDate(start);

            t.Days = 7;
            var expected = t.TimexValue;

            Assert.AreEqual(expected, TimexCreator.LastWeek());
        }