Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/12/10 01:29:35 (13 years ago)
Author:
swagner
Message:

Removed unnecessary checks if the application manager is not null (#954).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/Tests/UnitTest.cs

    r3265 r3303  
    2323using System.Threading;
    2424using HeuristicLab.Common;
     25using HeuristicLab.Data;
    2526using HeuristicLab.Optimization;
    2627using HeuristicLab.Persistence.Default.Xml;
     
    9091      trigger.WaitOne();
    9192      TestContext.WriteLine("Runtime: {0}", ga.ExecutionTime.ToString());
     93
     94      double expectedBestQuality = 12332.0;
     95      double expectedAverageQuality = 13123.2;
     96      double expectedWorstQuality = 14538.0;
     97      double bestQuality = (ga.Results["Current Best Quality"].Value as DoubleValue).Value;
     98      double averageQuality = (ga.Results["Current Average Quality"].Value as DoubleValue).Value;
     99      double worstQuality = (ga.Results["Current Worst Quality"].Value as DoubleValue).Value;
     100
     101      TestContext.WriteLine("");
     102      TestContext.WriteLine("Current Best Quality: {0} (should be {1})", bestQuality, expectedBestQuality);
     103      TestContext.WriteLine("Current Average Quality: {0} (should be {1})", averageQuality, expectedAverageQuality);
     104      TestContext.WriteLine("Current Worst Quality: {0} (should be {1})", worstQuality, expectedWorstQuality);
     105
     106      Assert.AreEqual(bestQuality, expectedBestQuality);
     107      Assert.AreEqual(averageQuality, expectedAverageQuality);
     108      Assert.AreEqual(worstQuality, expectedWorstQuality);
     109
    92110      if (ex != null) throw ex;
    93111    }
Note: See TracChangeset for help on using the changeset viewer.