コード例 #1
0
        public void Gets_age_statistics()
        {
            var expectedResult = new Dictionary <int, TimeSpan>
            {
                { 18, new TimeSpan(0, 0, 0, 12, 500) }
            };
            var schedulingStatisticCalculator = new SchedulingStatisticCalculator(AgeStatisticData());

            schedulingStatisticCalculator.GetAgeStatistics().ShouldBeEquivalentTo(expectedResult);
        }
コード例 #2
0
        public void Gets_success_ratio_statistics()
        {
            var expectedResult = new SuccessStatisticsDto
            {
                SuccessCount = 1,
                FailureCount = 1,
            };
            var schedulingStatisticCalculator = new SchedulingStatisticCalculator(SuccessRatioData());

            schedulingStatisticCalculator.GetSuccessStatistics().ShouldBeEquivalentTo(expectedResult);
        }
コード例 #3
0
        public void Gets_step_statistics()
        {
            var expectedResult = new StepsStatisticsDto
            {
                MinSteps = 4,
                MaxSteps = 6,
                AvgSteps = 5
            };
            var schedulingStatisticCalculator = new SchedulingStatisticCalculator(StepStatisticsData());

            schedulingStatisticCalculator.GetStepsStatistics().ShouldBeEquivalentTo(expectedResult);
        }
コード例 #4
0
        public void Gets_step_leaving_rate_statistics()
        {
            var expectedResult = new Dictionary <int, int>
            {
                { 0, 1 },
                { 1, 0 },
                { 2, 1 }
            };
            var schedulingStatisticCalculator = new SchedulingStatisticCalculator(StepLeavingStatisticsData());

            schedulingStatisticCalculator.GetStepLeavingRateStatistics().ShouldBeEquivalentTo(expectedResult);
        }
コード例 #5
0
        public void Gets_step_duration_statistics()
        {
            var expectedResult = new Dictionary <int, TimeSpan>
            {
                { 0, new TimeSpan(0, 0, 0, 15) },
                { 1, new TimeSpan(0, 0, 0, 15) },
                { 2, new TimeSpan(0, 0, 0, 15) },
            };
            var schedulingStatisticCalculator = new SchedulingStatisticCalculator(StepDurationStatisticsData());

            schedulingStatisticCalculator.GetStepDurationStatistics().ShouldBeEquivalentTo(expectedResult);
        }
コード例 #6
0
        public void Gets_scheduling_time_statistics()
        {
            var expectedResult = new SchedulingTimeDto
            {
                AvgSchedulingTime = new TimeSpan(0, 0, 0, 15),
                MaxSchedulingTime = new TimeSpan(0, 0, 0, 20),
                MinSchedulingTime = new TimeSpan(0, 0, 0, 10)
            };
            var schedulingStatisticCalculator = new SchedulingStatisticCalculator(TimeStatisticsData());

            schedulingStatisticCalculator.GetSchedulingTimeStatistics().ShouldBeEquivalentTo(expectedResult);
        }