Exemple #1
0
        public void StringContainsDayOffInfoWithDateTime([Values] DayType dayType)
        {
            var dateTime = 04.08.Of(2020);

            var dayOffInfo         = new DayOffDateTime(dateTime, dayType);
            var dayOffInfoAsString = dayOffInfo.ToString();

            Assert.That(dayOffInfoAsString, Is.EqualTo($"{dateTime:d} ({dayType:G})"));
        }
Exemple #2
0
        private static List <DayOffDateTime> GenerateDayOffDateTimeList(string responseResult, IReadOnlyList <DateTime> dates)
        {
            var results = new DayOffDateTime[dates.Count];

            for (var i = 0; i < dates.Count; i++)
            {
                var day = dates[i];
                var charDayRepresentation = responseResult[i];
                var dayType = ConvertCharToDateType(charDayRepresentation);
                results[i] = new DayOffDateTime(day, dayType);
            }

            return(results.ToList());
        }
Exemple #3
0
        public void DateTimeInfoSaves()
        {
            var dayOffInfo = new DayOffDateTime(04.08.Of(2020), DayType.ShortDay);

            Assert.That(dayOffInfo.DateTime, Is.EqualTo(04.08.Of(2020)));
        }
Exemple #4
0
        public void DayTypeInfoSaves([Values] DayType dayType)
        {
            var dayOffInfo = new DayOffDateTime(04.08.Of(2020), dayType);

            Assert.That(dayOffInfo.DayType, Is.EqualTo(dayType));
        }