コード例 #1
0
        public void GetMetricRepresentationReturnsSecondsForSuccessfulRun()
        {
            var parSorter = new SortByRuntime(factorPar: 7);
            var result    = new RuntimeResult(TimeSpan.FromSeconds(1234.78));

            Assert.Equal(
                1234.78,
                parSorter.GetMetricRepresentation(result));
        }
コード例 #2
0
        public void GetMetricRepresentationAddsPenalizationForCancelledRun()
        {
            var parSorter = new SortByRuntime(factorPar: 7);
            var result    = ResultBase <RuntimeResult> .CreateCancelledResult(TimeSpan.FromSeconds(3.1));

            Assert.Equal(
                21.7,
                parSorter.GetMetricRepresentation(result),
                8);
        }