コード例 #1
0
        public void Current_course_should_be_overdue_when_complete_by_date_is_in_the_past()
        {
            // Given
            var currentCourse = CurrentCourseHelper.CreateDefaultCurrentCourse(completeByDate: DateTime.Today - TimeSpan.FromDays(1));

            // When
            var currentCourseViewModel = new CurrentCourseViewModel(currentCourse);

            // Then
            currentCourseViewModel.DateStyle().Should().Be("overdue");
        }
コード例 #2
0
        public void Current_course_should_have_no_date_style_when_due_far_in_the_future()
        {
            // Given
            var currentCourse = CurrentCourseHelper.CreateDefaultCurrentCourse(completeByDate: DateTime.Today + TimeSpan.FromDays(100));

            // When
            var currentCourseViewModel = new CurrentCourseViewModel(currentCourse);



            // Then
            currentCourseViewModel.DateStyle().Should().Be("");
        }
コード例 #3
0
        public void Current_course_should__be_due_soon_when_complete_by_date_is_in_the_future()
        {
            // Given
            var currentCourse =
                CurrentCourseHelper.CreateDefaultCurrentCourse(completeByDate: DateTime.Today + TimeSpan.FromDays(1));

            // When
            var currentCourseViewModel = new CurrentCourseViewModel(
                currentCourse,
                ReturnPageQueryHelper.GetDefaultReturnPageQuery()
                );

            // Then
            currentCourseViewModel.DateStyle().Should().Be("due-soon");
        }