Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/17/19 17:28:33 (5 years ago)
Author:
mkommend
Message:

#2521: Adapted unit tests for multi-objective analysis.

Location:
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/Multi-objective
Files:
1 added
1 copied

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/Multi-objective/SpacingTest.cs

    r17261 r17262  
    2222using Microsoft.VisualStudio.TestTools.UnitTesting;
    2323
    24 namespace HeuristicLab.Problems.TestFunctions.MultiObjective.Tests {
     24namespace HeuristicLab.Analysis.MultiObjective.Tests {
    2525  [TestClass]
    2626  public class SpacingTest {
    2727    [TestMethod]
    2828    [ExpectedException(typeof(ArgumentException))]
    29     [TestCategory("Problems.TestFunctions.MultiObjective")]
     29    [TestCategory("Analysis.MultiObjective")]
    3030    [TestProperty("Time", "short")]
    3131    public void SpacingTestEmptyFront() {
    3232      double[][] front = { };
    3333
    34       Spacing.Calculate(front);
     34      SpacingAnalyzer.CalculateSpacing(front);
    3535    }
    3636
    3737    [TestMethod]
    38     [TestCategory("Problems.TestFunctions.MultiObjective")]
     38    [TestCategory("Analysis.MultiObjective")]
    3939    [TestProperty("Time", "short")]
    4040    public void SpacingTestSamePoint() {
     
    4848      point1[1] = 0.5;
    4949      double[][] front = { point, point1 };
    50       double dist = Spacing.Calculate(front);
     50      double dist = SpacingAnalyzer.CalculateSpacing(front);
    5151      Assert.AreEqual(0, dist);
    5252    }
    5353
    5454    [TestMethod]
    55     [TestCategory("Problems.TestFunctions.MultiObjective")]
     55    [TestCategory("Analysis.MultiObjective")]
    5656    [TestProperty("Time", "short")]
    5757    public void SpacingTestSinglePoint() {
     
    6060      point[1] = 0;
    6161      double[][] front = { point };
    62       double dist = Spacing.Calculate(front);
     62      double dist = SpacingAnalyzer.CalculateSpacing(front);
    6363      Assert.AreEqual(0, dist);
    6464    }
    6565
    6666    [TestMethod]
    67     [TestCategory("Problems.TestFunctions.MultiObjective")]
     67    [TestCategory("Analysis.MultiObjective")]
    6868    [TestProperty("Time", "short")]
    6969    public void SpacingTestQuadratic() {
     
    8282      point3[1] = 1;
    8383      double[][] front = { point, point1, point2, point3 };
    84       double dist = Spacing.Calculate(front);
     84      double dist = SpacingAnalyzer.CalculateSpacing(front);
    8585      Assert.AreEqual(0, dist);
    8686    }
    8787
    8888    [TestMethod]
    89     [TestCategory("Problems.TestFunctions.MultiObjective")]
     89    [TestCategory("Analysis.MultiObjective")]
    9090    [TestProperty("Time", "short")]
    9191    public void SpacingTestRectangular() {
     
    104104      point3[1] = 1;
    105105      double[][] front = { point, point1, point2, point3 };
    106       double dist = Spacing.Calculate(front);
     106      double dist = SpacingAnalyzer.CalculateSpacing(front);
    107107      Assert.AreEqual(0, dist);
    108108    }
     
    111111    /// deltoid with 3 points of the 1-unit-square and the northeastern point at 4,4
    112112    /// which gives d=(1,1,1,5) for minimal distances. Mean of d is 2 and variance of d is 3
    113     /// Spacing is defined as the standarddeviation of d
     113    /// Spacing is defined as the standard deviation of d
    114114    /// </summary>
    115115    [TestMethod]
    116     [TestCategory("Problems.TestFunctions.MultiObjective")]
     116    [TestCategory("Analysis.MultiObjective")]
    117117    [TestProperty("Time", "short")]
    118118    public void SpacingTestDeltoid() {
     
    131131      point3[1] = 4;
    132132      double[][] front = { point, point1, point2, point3 };
    133       double dist = Spacing.Calculate(front);
     133      double dist = SpacingAnalyzer.CalculateSpacing(front);
    134134      Assert.AreEqual(Math.Sqrt(3), dist);
    135135    }
Note: See TracChangeset for help on using the changeset viewer.