Esempio n. 1
0
        public void Should_get_correct_today_date_collection()
        {
            // Arrange

            var expectedDays = new Days()
            {
                TodayInt = 20190203, Yesterday = 20190202, TwoDaysAgo = 20190130
            };

            // Act
            var generator = new DayCollectionGenearator();
            var days      = generator.GenerateToday();

            // Assert
            Assert.Equal(expectedDays, days);
        }
Esempio n. 2
0
        public void Should_get_correct_date_collection(string date, int today, int yesterday, int twodaysago)
        {
            // Arrange
            var currentDate  = Convert.ToDateTime(date);
            var expectedDays = new Days()
            {
                TodayInt = today, Yesterday = yesterday, TwoDaysAgo = twodaysago
            };

            // Act
            var generator = new DayCollectionGenearator();
            var days      = generator.GenerateByDate(currentDate);

            // Assert
            Assert.Equal(expectedDays, days);
        }