public void PrioritizesTasksWithHigherPriority()
        {
            var highPriorityTask = new WeekPlanHelper.TaskHelper(new Task
            {
                Priority = 0, Time = 10, Split = 1
            })
            {
                DayTimes = new int[] { 1, 0, 0, 0, 0, 0, 0 }
            };
            var lowPriorityTask = new WeekPlanHelper.TaskHelper(new Task
            {
                Priority = 1, Time = 10, Split = 1
            })
            {
                DayTimes = new int[] { 1, 0, 0, 0, 0, 0, 0 }
            };
            var highPriorityGoodness = WeekPlanHelper.GetChromosomGoodness(new List <WeekPlanHelper.TaskHelper>()
            {
                highPriorityTask
            });
            var lowPriorityGoodness = WeekPlanHelper.GetChromosomGoodness(new List <WeekPlanHelper.TaskHelper>()
            {
                lowPriorityTask
            });

            Assert.True(highPriorityGoodness > lowPriorityGoodness);
        }
 public void DoesNotThrowWhenRemovingWorstChromosomsWithInvalidValue()
 {
     WeekPlanHelper.RemoveWorstChromosoms(new List <List <WeekPlanHelper.TaskHelper> >()
     {
         new List <WeekPlanHelper.TaskHelper>
         {
             new WeekPlanHelper.TaskHelper(new Task()), new WeekPlanHelper.TaskHelper(new Task())
         }
     }, 2.0);
 }
 public void ReturnsNullForBestChromosomOnEmptyList()
 {
     Assert.Null(WeekPlanHelper.GetBestChromosom(new List <List <WeekPlanHelper.TaskHelper> >()));
 }
 public void DoesNotThrowWhenRemovingWorstChromosomsOnEmptyList()
 {
     WeekPlanHelper.RemoveWorstChromosoms(new List <List <WeekPlanHelper.TaskHelper> >(), 0.5);
 }