Пример #1
0
        public void Get_course_content_should_not_use_status_0_tutorials_in_averageDuration()
        {
            // Given
            const int candidateId     = 22966;
            const int customisationId = 7669;

            // When
            var result = courseContentService.GetCourseContent(candidateId, customisationId);

            // Then
            result.Should().NotBeNull();
            result !.AverageDuration.Should().Be(83);
        }
Пример #2
0
        public void Get_course_content_should_not_use_archived_tutorials_in_averageDuration()
        {
            // Given
            const int candidateId     = 210962;
            const int customisationId = 22158;

            // When
            var result = courseContentService.GetCourseContent(candidateId, customisationId);

            // Then
            result.Should().NotBeNull();
            result !.AverageDuration.Should().Be(1);
        }
Пример #3
0
        public void Get_course_content_uses_overrideTutorialMins_when_calculating_duration()
        {
            // Given
            const int customisationId = 23638;
            const int candidateId     = 286788;

            // When
            var result = courseContentService.GetCourseContent(candidateId, customisationId);

            // Then
            result.Should().NotBeNull();
            result !.AverageDuration.Should().Be(75);
        }
Пример #4
0
 public string Format(string tag)
 {
     Tracer.Assert(IsValid);
     return(_position
            + " #"
            + tag
            + ":  "
            + _countEnd.Format3Digits()
            + "x  "
            + AverageDuration.Format3Digits()
            + "  "
            + _duration.Format3Digits()
            + "\n");
 }
        public override string ToString()
        {
            string S = "{0}, ".Build(Name);

            S += "Values count: {0}".Build(ValuesCount);
            if (ValuesCount > 0)
            {
                S += ", Total: {0}, ".Build(TotalDuration.Format());
                S += "Avg.: {0}, ".Build(AverageDuration.Format());
                S += "Min.: {0}, ".Build(MinDuration.Format());
                S += "Max.: {0}".Build(MaxDuration.Format());
            }
            return(S);
        }