Changeset 17262 for branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/Multi-objective/SpacingTest.cs
- Timestamp:
- 09/17/19 17:28:33 (5 years ago)
- 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 22 22 using Microsoft.VisualStudio.TestTools.UnitTesting; 23 23 24 namespace HeuristicLab. Problems.TestFunctions.MultiObjective.Tests {24 namespace HeuristicLab.Analysis.MultiObjective.Tests { 25 25 [TestClass] 26 26 public class SpacingTest { 27 27 [TestMethod] 28 28 [ExpectedException(typeof(ArgumentException))] 29 [TestCategory(" Problems.TestFunctions.MultiObjective")]29 [TestCategory("Analysis.MultiObjective")] 30 30 [TestProperty("Time", "short")] 31 31 public void SpacingTestEmptyFront() { 32 32 double[][] front = { }; 33 33 34 Spacing .Calculate(front);34 SpacingAnalyzer.CalculateSpacing(front); 35 35 } 36 36 37 37 [TestMethod] 38 [TestCategory(" Problems.TestFunctions.MultiObjective")]38 [TestCategory("Analysis.MultiObjective")] 39 39 [TestProperty("Time", "short")] 40 40 public void SpacingTestSamePoint() { … … 48 48 point1[1] = 0.5; 49 49 double[][] front = { point, point1 }; 50 double dist = Spacing .Calculate(front);50 double dist = SpacingAnalyzer.CalculateSpacing(front); 51 51 Assert.AreEqual(0, dist); 52 52 } 53 53 54 54 [TestMethod] 55 [TestCategory(" Problems.TestFunctions.MultiObjective")]55 [TestCategory("Analysis.MultiObjective")] 56 56 [TestProperty("Time", "short")] 57 57 public void SpacingTestSinglePoint() { … … 60 60 point[1] = 0; 61 61 double[][] front = { point }; 62 double dist = Spacing .Calculate(front);62 double dist = SpacingAnalyzer.CalculateSpacing(front); 63 63 Assert.AreEqual(0, dist); 64 64 } 65 65 66 66 [TestMethod] 67 [TestCategory(" Problems.TestFunctions.MultiObjective")]67 [TestCategory("Analysis.MultiObjective")] 68 68 [TestProperty("Time", "short")] 69 69 public void SpacingTestQuadratic() { … … 82 82 point3[1] = 1; 83 83 double[][] front = { point, point1, point2, point3 }; 84 double dist = Spacing .Calculate(front);84 double dist = SpacingAnalyzer.CalculateSpacing(front); 85 85 Assert.AreEqual(0, dist); 86 86 } 87 87 88 88 [TestMethod] 89 [TestCategory(" Problems.TestFunctions.MultiObjective")]89 [TestCategory("Analysis.MultiObjective")] 90 90 [TestProperty("Time", "short")] 91 91 public void SpacingTestRectangular() { … … 104 104 point3[1] = 1; 105 105 double[][] front = { point, point1, point2, point3 }; 106 double dist = Spacing .Calculate(front);106 double dist = SpacingAnalyzer.CalculateSpacing(front); 107 107 Assert.AreEqual(0, dist); 108 108 } … … 111 111 /// deltoid with 3 points of the 1-unit-square and the northeastern point at 4,4 112 112 /// 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 standard deviation of d113 /// Spacing is defined as the standard deviation of d 114 114 /// </summary> 115 115 [TestMethod] 116 [TestCategory(" Problems.TestFunctions.MultiObjective")]116 [TestCategory("Analysis.MultiObjective")] 117 117 [TestProperty("Time", "short")] 118 118 public void SpacingTestDeltoid() { … … 131 131 point3[1] = 4; 132 132 double[][] front = { point, point1, point2, point3 }; 133 double dist = Spacing .Calculate(front);133 double dist = SpacingAnalyzer.CalculateSpacing(front); 134 134 Assert.AreEqual(Math.Sqrt(3), dist); 135 135 }
Note: See TracChangeset
for help on using the changeset viewer.