ReuseOldTreesStrategy> CreateTestStatus()
        {
            var status = this.CreateStatus(0, this._population, this._configuration, 0, this._informationHistory);

            status.SetRunResults(StatusTest.CreateRunResultsForTest());
            return(status);
        }
        public void SetRunResultsSetsRunResults()
        {
            /* Create status object. */
            var status = this.CreateStatus(0, this._population, this._configuration, 0, this._informationHistory);

            /* Set results. */
            var runResults = StatusTest.CreateRunResultsForTest();

            status.SetRunResults(runResults);

            /* Check RunResults property. */
            Assert.Equal(
                runResults,
                status.RunResults);
        }
        public void SetRunResultsOverwritesOldResults()
        {
            /* Create status object. */
            var status = this.CreateStatus(0, this._population, this._configuration, 0, this._informationHistory);

            /* Set results. */
            var runResults = StatusTest.CreateRunResultsForTest();

            status.SetRunResults(runResults);
            Assert.Equal(runResults.Count, status.RunResults.Count);

            /* Set them again. */
            var runResults2 = new Dictionary <ImmutableGenome, ImmutableDictionary <TestInstance, TestResult> >();

            status.SetRunResults(runResults2.ToImmutableDictionary());

            /* Make sure second one is stored. */
            Assert.Empty(status.RunResults);
        }