- Timestamp:
- 07/26/13 13:25:19 (11 years ago)
- Location:
- trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/Auxiliary.cs
r9764 r9777 20 20 #endregion 21 21 22 using HeuristicLab.Encodings.PermutationEncoding;23 24 22 namespace HeuristicLab.Encodings.PermutationEncoding.Tests { 25 23 public static class Auxiliary { -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/CosaCrossoverTest.cs
r9767 r9777 21 21 22 22 using HeuristicLab.Core; 23 using HeuristicLab.Encodings.PermutationEncoding;24 23 using HeuristicLab.Tests; 25 24 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 32 31 [TestClass()] 33 32 public class CosaCrossoverTest { 34 35 36 private TestContext testContextInstance;37 38 /// <summary>39 ///Gets or sets the test context which provides40 ///information about and functionality for the current test run.41 ///</summary>42 public TestContext TestContext {43 get {44 return testContextInstance;45 }46 set {47 testContextInstance = value;48 }49 }50 51 #region Additional test attributes52 //53 //You can use the following additional attributes as you write your tests:54 //55 //Use ClassInitialize to run code before running the first test in the class56 //[ClassInitialize()]57 //public static void MyClassInitialize(TestContext testContext)58 //{59 //}60 //61 //Use ClassCleanup to run code after all tests in a class have run62 //[ClassCleanup()]63 //public static void MyClassCleanup()64 //{65 //}66 //67 //Use TestInitialize to run code before running each test68 //[TestInitialize()]69 //public void MyTestInitialize()70 //{71 //}72 //73 //Use TestCleanup to run code after each test has run74 //[TestCleanup()]75 //public void MyTestCleanup()76 //{77 //}78 //79 #endregion80 81 82 33 /// <summary> 83 34 ///A test for Cross 84 35 ///</summary> 85 36 [TestMethod] 86 [DeploymentItem("HeuristicLab.Encodings.PermutationEncoding-3.3.dll")] 37 [TestCategory("Encodings.Permutation")] 38 [TestProperty("Time", "short")] 87 39 public void CosaCrossoverCrossTest() { 88 40 TestRandom random = new TestRandom(); … … 95 47 target.Cross(random, new ItemArray<Permutation>(new Permutation[] { 96 48 new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4)})); 97 } 98 catch (System.InvalidOperationException) { 49 } catch (System.InvalidOperationException) { 99 50 exceptionFired = true; 100 51 } … … 106 57 ///</summary> 107 58 [TestMethod] 59 [TestCategory("Encodings.Permutation")] 60 [TestProperty("Time", "short")] 108 61 public void CosaCrossoverApplyTest() { 109 62 TestRandom random = new TestRandom(); … … 151 104 try { 152 105 CosaCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6)); 153 } 154 catch (System.ArgumentException) { 106 } catch (System.ArgumentException) { 155 107 exceptionFired = true; 156 108 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/CyclicCrossover2Test.cs
r9767 r9777 21 21 22 22 using HeuristicLab.Core; 23 using HeuristicLab.Encodings.PermutationEncoding;24 23 using HeuristicLab.Tests; 25 24 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 32 31 [TestClass()] 33 32 public class CyclicCrossover2Test { 34 35 36 private TestContext testContextInstance;37 38 /// <summary>39 ///Gets or sets the test context which provides40 ///information about and functionality for the current test run.41 ///</summary>42 public TestContext TestContext {43 get {44 return testContextInstance;45 }46 set {47 testContextInstance = value;48 }49 }50 51 #region Additional test attributes52 //53 //You can use the following additional attributes as you write your tests:54 //55 //Use ClassInitialize to run code before running the first test in the class56 //[ClassInitialize()]57 //public static void MyClassInitialize(TestContext testContext)58 //{59 //}60 //61 //Use ClassCleanup to run code after all tests in a class have run62 //[ClassCleanup()]63 //public static void MyClassCleanup()64 //{65 //}66 //67 //Use TestInitialize to run code before running each test68 //[TestInitialize()]69 //public void MyTestInitialize()70 //{71 //}72 //73 //Use TestCleanup to run code after each test has run74 //[TestCleanup()]75 //public void MyTestCleanup()76 //{77 //}78 //79 #endregion80 81 82 33 /// <summary> 83 34 ///A test for Cross 84 35 ///</summary> 85 36 [TestMethod] 86 [DeploymentItem("HeuristicLab.Encodings.PermutationEncoding-3.3.dll")] 37 [TestCategory("Encodings.Permutation")] 38 [TestProperty("Time", "short")] 87 39 public void CyclicCrossover2CrossTest() { 88 40 TestRandom random = new TestRandom(); … … 94 46 target.Cross(random, new ItemArray<Permutation>(new Permutation[] { 95 47 new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4)})); 96 } 97 catch (System.InvalidOperationException) { 48 } catch (System.InvalidOperationException) { 98 49 exceptionFired = true; 99 50 } … … 105 56 ///</summary> 106 57 [TestMethod] 58 [TestCategory("Encodings.Permutation")] 59 [TestProperty("Time", "short")] 107 60 public void CyclicCrossover2ApplyTest() { 108 61 TestRandom random = new TestRandom(); … … 126 79 try { 127 80 CyclicCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6)); 128 } 129 catch (System.ArgumentException) { 81 } catch (System.ArgumentException) { 130 82 exceptionFired = true; 131 83 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/CyclicCrossoverTest.cs
r9767 r9777 21 21 22 22 using HeuristicLab.Core; 23 using HeuristicLab.Encodings.PermutationEncoding;24 23 using HeuristicLab.Tests; 25 24 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 32 31 [TestClass()] 33 32 public class CyclicCrossoverTest { 34 35 36 private TestContext testContextInstance;37 38 /// <summary>39 ///Gets or sets the test context which provides40 ///information about and functionality for the current test run.41 ///</summary>42 public TestContext TestContext {43 get {44 return testContextInstance;45 }46 set {47 testContextInstance = value;48 }49 }50 51 #region Additional test attributes52 //53 //You can use the following additional attributes as you write your tests:54 //55 //Use ClassInitialize to run code before running the first test in the class56 //[ClassInitialize()]57 //public static void MyClassInitialize(TestContext testContext)58 //{59 //}60 //61 //Use ClassCleanup to run code after all tests in a class have run62 //[ClassCleanup()]63 //public static void MyClassCleanup()64 //{65 //}66 //67 //Use TestInitialize to run code before running each test68 //[TestInitialize()]69 //public void MyTestInitialize()70 //{71 //}72 //73 //Use TestCleanup to run code after each test has run74 //[TestCleanup()]75 //public void MyTestCleanup()76 //{77 //}78 //79 #endregion80 81 82 33 /// <summary> 83 34 ///A test for Cross 84 35 ///</summary> 85 36 [TestMethod] 86 [DeploymentItem("HeuristicLab.Encodings.PermutationEncoding-3.3.dll")] 37 [TestCategory("Encodings.Permutation")] 38 [TestProperty("Time", "short")] 87 39 public void CyclicCrossoverCrossTest() { 88 40 TestRandom random = new TestRandom(); … … 95 47 target.Cross(random, new ItemArray<Permutation>(new Permutation[] { 96 48 new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4)})); 97 } 98 catch (System.InvalidOperationException) { 49 } catch (System.InvalidOperationException) { 99 50 exceptionFired = true; 100 51 } … … 106 57 ///</summary> 107 58 [TestMethod] 59 [TestCategory("Encodings.Permutation")] 60 [TestProperty("Time", "short")] 108 61 public void CyclicCrossoverApplyTest() { 109 62 TestRandom random = new TestRandom(); … … 127 80 try { 128 81 CyclicCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6)); 129 } 130 catch (System.ArgumentException) { 82 } catch (System.ArgumentException) { 131 83 exceptionFired = true; 132 84 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/EdgeRecombinationCrossoverTest.cs
r9767 r9777 21 21 22 22 using HeuristicLab.Core; 23 using HeuristicLab.Encodings.PermutationEncoding;24 23 using HeuristicLab.Tests; 25 24 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 32 31 [TestClass()] 33 32 public class EdgeRecombinationCrossoverTest { 34 35 36 private TestContext testContextInstance;37 38 /// <summary>39 ///Gets or sets the test context which provides40 ///information about and functionality for the current test run.41 ///</summary>42 public TestContext TestContext {43 get {44 return testContextInstance;45 }46 set {47 testContextInstance = value;48 }49 }50 51 #region Additional test attributes52 //53 //You can use the following additional attributes as you write your tests:54 //55 //Use ClassInitialize to run code before running the first test in the class56 //[ClassInitialize()]57 //public static void MyClassInitialize(TestContext testContext)58 //{59 //}60 //61 //Use ClassCleanup to run code after all tests in a class have run62 //[ClassCleanup()]63 //public static void MyClassCleanup()64 //{65 //}66 //67 //Use TestInitialize to run code before running each test68 //[TestInitialize()]69 //public void MyTestInitialize()70 //{71 //}72 //73 //Use TestCleanup to run code after each test has run74 //[TestCleanup()]75 //public void MyTestCleanup()76 //{77 //}78 //79 #endregion80 81 82 33 /// <summary> 83 34 ///A test for Cross 84 35 ///</summary> 85 36 [TestMethod] 86 [DeploymentItem("HeuristicLab.Encodings.PermutationEncoding-3.3.dll")] 37 [TestCategory("Encodings.Permutation")] 38 [TestProperty("Time", "short")] 87 39 public void EdgeRecombinationCrossoverCrossoverCrossTest() { 88 40 TestRandom random = new TestRandom(); … … 95 47 target.Cross(random, new ItemArray<Permutation>(new Permutation[] { 96 48 new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4)})); 97 } 98 catch (System.InvalidOperationException) { 49 } catch (System.InvalidOperationException) { 99 50 exceptionFired = true; 100 51 } … … 106 57 ///</summary> 107 58 [TestMethod] 59 [TestCategory("Encodings.Permutation")] 60 [TestProperty("Time", "short")] 108 61 public void EdgeRecombinationCrossoverApplyTest() { 109 62 TestRandom random = new TestRandom(); … … 128 81 try { 129 82 EdgeRecombinationCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6)); 130 } 131 catch (System.ArgumentException) { 83 } catch (System.ArgumentException) { 132 84 exceptionFired = true; 133 85 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/InsertionManipulatorTest.cs
r9767 r9777 20 20 #endregion 21 21 22 using HeuristicLab.Encodings.PermutationEncoding;23 22 using HeuristicLab.Tests; 24 23 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 31 30 [TestClass()] 32 31 public class InsertionManipulatorTest { 33 34 35 private TestContext testContextInstance;36 37 /// <summary>38 ///Gets or sets the test context which provides39 ///information about and functionality for the current test run.40 ///</summary>41 public TestContext TestContext {42 get {43 return testContextInstance;44 }45 set {46 testContextInstance = value;47 }48 }49 50 #region Additional test attributes51 //52 //You can use the following additional attributes as you write your tests:53 //54 //Use ClassInitialize to run code before running the first test in the class55 //[ClassInitialize()]56 //public static void MyClassInitialize(TestContext testContext)57 //{58 //}59 //60 //Use ClassCleanup to run code after all tests in a class have run61 //[ClassCleanup()]62 //public static void MyClassCleanup()63 //{64 //}65 //66 //Use TestInitialize to run code before running each test67 //[TestInitialize()]68 //public void MyTestInitialize()69 //{70 //}71 //72 //Use TestCleanup to run code after each test has run73 //[TestCleanup()]74 //public void MyTestCleanup()75 //{76 //}77 //78 #endregion79 80 81 32 /// <summary> 82 33 ///A test for Apply 83 34 ///</summary> 84 35 [TestMethod] 36 [TestCategory("Encodings.Permutation")] 37 [TestProperty("Time", "short")] 85 38 public void InsertionManipulatorApplyTest() { 86 39 TestRandom random = new TestRandom(); -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/InversionManipulatorTest.cs
r9767 r9777 20 20 #endregion 21 21 22 using HeuristicLab.Encodings.PermutationEncoding;23 22 using HeuristicLab.Tests; 24 23 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 31 30 [TestClass()] 32 31 public class InversionManipulatorTest { 33 34 35 private TestContext testContextInstance;36 37 /// <summary>38 ///Gets or sets the test context which provides39 ///information about and functionality for the current test run.40 ///</summary>41 public TestContext TestContext {42 get {43 return testContextInstance;44 }45 set {46 testContextInstance = value;47 }48 }49 50 #region Additional test attributes51 //52 //You can use the following additional attributes as you write your tests:53 //54 //Use ClassInitialize to run code before running the first test in the class55 //[ClassInitialize()]56 //public static void MyClassInitialize(TestContext testContext)57 //{58 //}59 //60 //Use ClassCleanup to run code after all tests in a class have run61 //[ClassCleanup()]62 //public static void MyClassCleanup()63 //{64 //}65 //66 //Use TestInitialize to run code before running each test67 //[TestInitialize()]68 //public void MyTestInitialize()69 //{70 //}71 //72 //Use TestCleanup to run code after each test has run73 //[TestCleanup()]74 //public void MyTestCleanup()75 //{76 //}77 //78 #endregion79 80 81 32 /// <summary> 82 33 ///A test for Apply 83 34 ///</summary> 84 35 [TestMethod] 36 [TestCategory("Encodings.Permutation")] 37 [TestProperty("Time", "short")] 85 38 public void InversionManipulatorApplyTest() { 86 39 TestRandom random = new TestRandom(); -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/MaximalPreservativeCrossoverTest.cs
r9767 r9777 21 21 22 22 using HeuristicLab.Core; 23 using HeuristicLab.Encodings.PermutationEncoding;24 23 using HeuristicLab.Tests; 25 24 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 32 31 [TestClass()] 33 32 public class MaximalPreservativeCrossoverTest { 34 35 36 private TestContext testContextInstance;37 38 /// <summary>39 ///Gets or sets the test context which provides40 ///information about and functionality for the current test run.41 ///</summary>42 public TestContext TestContext {43 get {44 return testContextInstance;45 }46 set {47 testContextInstance = value;48 }49 }50 51 #region Additional test attributes52 //53 //You can use the following additional attributes as you write your tests:54 //55 //Use ClassInitialize to run code before running the first test in the class56 //[ClassInitialize()]57 //public static void MyClassInitialize(TestContext testContext)58 //{59 //}60 //61 //Use ClassCleanup to run code after all tests in a class have run62 //[ClassCleanup()]63 //public static void MyClassCleanup()64 //{65 //}66 //67 //Use TestInitialize to run code before running each test68 //[TestInitialize()]69 //public void MyTestInitialize()70 //{71 //}72 //73 //Use TestCleanup to run code after each test has run74 //[TestCleanup()]75 //public void MyTestCleanup()76 //{77 //}78 //79 #endregion80 81 82 33 /// <summary> 83 34 ///A test for Cross 84 35 ///</summary> 85 36 [TestMethod] 86 [DeploymentItem("HeuristicLab.Encodings.PermutationEncoding-3.3.dll")] 37 [TestCategory("Encodings.Permutation")] 38 [TestProperty("Time", "short")] 87 39 public void MaximalPreservativeCrossoverCrossTest() { 88 40 TestRandom random = new TestRandom(); … … 95 47 target.Cross(random, new ItemArray<Permutation>(new Permutation[] { 96 48 new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4)})); 97 } 98 catch (System.InvalidOperationException) { 49 } catch (System.InvalidOperationException) { 99 50 exceptionFired = true; 100 51 } … … 106 57 ///</summary> 107 58 [TestMethod] 59 [TestCategory("Encodings.Permutation")] 60 [TestProperty("Time", "short")] 108 61 public void MaximalPreservativeCrossoverApplyTest() { 109 62 TestRandom random = new TestRandom(); … … 127 80 try { 128 81 MaximalPreservativeCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6)); 129 } 130 catch (System.ArgumentException) { 82 } catch (System.ArgumentException) { 131 83 exceptionFired = true; 132 84 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/OrderBasedCrossoverTest.cs
r9767 r9777 21 21 22 22 using HeuristicLab.Core; 23 using HeuristicLab.Encodings.PermutationEncoding;24 23 using HeuristicLab.Tests; 25 24 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 32 31 [TestClass()] 33 32 public class OrderBasedCrossoverTest { 34 35 36 private TestContext testContextInstance;37 38 /// <summary>39 ///Gets or sets the test context which provides40 ///information about and functionality for the current test run.41 ///</summary>42 public TestContext TestContext {43 get {44 return testContextInstance;45 }46 set {47 testContextInstance = value;48 }49 }50 51 #region Additional test attributes52 //53 //You can use the following additional attributes as you write your tests:54 //55 //Use ClassInitialize to run code before running the first test in the class56 //[ClassInitialize()]57 //public static void MyClassInitialize(TestContext testContext)58 //{59 //}60 //61 //Use ClassCleanup to run code after all tests in a class have run62 //[ClassCleanup()]63 //public static void MyClassCleanup()64 //{65 //}66 //67 //Use TestInitialize to run code before running each test68 //[TestInitialize()]69 //public void MyTestInitialize()70 //{71 //}72 //73 //Use TestCleanup to run code after each test has run74 //[TestCleanup()]75 //public void MyTestCleanup()76 //{77 //}78 //79 #endregion80 81 82 33 /// <summary> 83 34 ///A test for Cross 84 35 ///</summary> 85 36 [TestMethod] 86 [DeploymentItem("HeuristicLab.Encodings.PermutationEncoding-3.3.dll")] 37 [TestCategory("Encodings.Permutation")] 38 [TestProperty("Time", "short")] 87 39 public void OrderBasedCrossoverCrossTest() { 88 40 TestRandom random = new TestRandom(); … … 95 47 target.Cross(random, new ItemArray<Permutation>(new Permutation[] { 96 48 new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4)})); 97 } 98 catch (System.InvalidOperationException) { 49 } catch (System.InvalidOperationException) { 99 50 exceptionFired = true; 100 51 } … … 106 57 ///</summary> 107 58 [TestMethod] 59 [TestCategory("Encodings.Permutation")] 60 [TestProperty("Time", "short")] 108 61 public void OrderBasedCrossoverApplyTest() { 109 62 TestRandom random = new TestRandom(); … … 125 78 try { 126 79 OrderBasedCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6)); 127 } 128 catch (System.ArgumentException) { 80 } catch (System.ArgumentException) { 129 81 exceptionFired = true; 130 82 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/OrderCrossover2Test.cs
r9767 r9777 21 21 22 22 using HeuristicLab.Core; 23 using HeuristicLab.Encodings.PermutationEncoding;24 23 using HeuristicLab.Tests; 25 24 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 32 31 [TestClass()] 33 32 public class OrderCrossover2Test { 34 35 36 private TestContext testContextInstance;37 38 /// <summary>39 ///Gets or sets the test context which provides40 ///information about and functionality for the current test run.41 ///</summary>42 public TestContext TestContext {43 get {44 return testContextInstance;45 }46 set {47 testContextInstance = value;48 }49 }50 51 #region Additional test attributes52 //53 //You can use the following additional attributes as you write your tests:54 //55 //Use ClassInitialize to run code before running the first test in the class56 //[ClassInitialize()]57 //public static void MyClassInitialize(TestContext testContext)58 //{59 //}60 //61 //Use ClassCleanup to run code after all tests in a class have run62 //[ClassCleanup()]63 //public static void MyClassCleanup()64 //{65 //}66 //67 //Use TestInitialize to run code before running each test68 //[TestInitialize()]69 //public void MyTestInitialize()70 //{71 //}72 //73 //Use TestCleanup to run code after each test has run74 //[TestCleanup()]75 //public void MyTestCleanup()76 //{77 //}78 //79 #endregion80 81 82 33 /// <summary> 83 34 ///A test for Cross 84 35 ///</summary> 85 36 [TestMethod] 86 [DeploymentItem("HeuristicLab.Encodings.PermutationEncoding-3.3.dll")] 37 [TestCategory("Encodings.Permutation")] 38 [TestProperty("Time", "short")] 87 39 public void OrderCrossover2CrossTest() { 88 40 TestRandom random = new TestRandom(); … … 93 45 target.Cross(random, new ItemArray<Permutation>(new Permutation[] { 94 46 new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4)})); 95 } 96 catch (System.InvalidOperationException) { 47 } catch (System.InvalidOperationException) { 97 48 exceptionFired = true; 98 49 } … … 104 55 ///</summary> 105 56 [TestMethod] 57 [TestCategory("Encodings.Permutation")] 58 [TestProperty("Time", "short")] 106 59 public void OrderCrossover2ApplyTest() { 107 60 TestRandom random = new TestRandom(); … … 125 78 try { 126 79 OrderCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6)); 127 } 128 catch (System.ArgumentException) { 80 } catch (System.ArgumentException) { 129 81 exceptionFired = true; 130 82 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/OrderCrossoverTest.cs
r9767 r9777 21 21 22 22 using HeuristicLab.Core; 23 using HeuristicLab.Encodings.PermutationEncoding;24 23 using HeuristicLab.Tests; 25 24 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 32 31 [TestClass()] 33 32 public class OrderCrossoverTest { 34 35 36 private TestContext testContextInstance;37 38 /// <summary>39 ///Gets or sets the test context which provides40 ///information about and functionality for the current test run.41 ///</summary>42 public TestContext TestContext {43 get {44 return testContextInstance;45 }46 set {47 testContextInstance = value;48 }49 }50 51 #region Additional test attributes52 //53 //You can use the following additional attributes as you write your tests:54 //55 //Use ClassInitialize to run code before running the first test in the class56 //[ClassInitialize()]57 //public static void MyClassInitialize(TestContext testContext)58 //{59 //}60 //61 //Use ClassCleanup to run code after all tests in a class have run62 //[ClassCleanup()]63 //public static void MyClassCleanup()64 //{65 //}66 //67 //Use TestInitialize to run code before running each test68 //[TestInitialize()]69 //public void MyTestInitialize()70 //{71 //}72 //73 //Use TestCleanup to run code after each test has run74 //[TestCleanup()]75 //public void MyTestCleanup()76 //{77 //}78 //79 #endregion80 81 82 33 /// <summary> 83 34 ///A test for Cross 84 35 ///</summary> 85 36 [TestMethod] 86 [DeploymentItem("HeuristicLab.Encodings.PermutationEncoding-3.3.dll")] 37 [TestCategory("Encodings.Permutation")] 38 [TestProperty("Time", "short")] 87 39 public void OrderCrossoverCrossTest() { 88 40 TestRandom random = new TestRandom(); … … 95 47 target.Cross(random, new ItemArray<Permutation>(new Permutation[] { 96 48 new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4)})); 97 } 98 catch (System.InvalidOperationException) { 49 } catch (System.InvalidOperationException) { 99 50 exceptionFired = true; 100 51 } … … 106 57 ///</summary> 107 58 [TestMethod] 59 [TestCategory("Encodings.Permutation")] 60 [TestProperty("Time", "short")] 108 61 public void OrderCrossoverApplyTest() { 109 62 TestRandom random = new TestRandom(); … … 178 131 try { 179 132 OrderCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6)); 180 } 181 catch (System.ArgumentException) { 133 } catch (System.ArgumentException) { 182 134 exceptionFired = true; 183 135 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/PartiallyMatchedCrossoverTest.cs
r9767 r9777 21 21 22 22 using HeuristicLab.Core; 23 using HeuristicLab.Encodings.PermutationEncoding;24 23 using HeuristicLab.Tests; 25 24 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 32 31 [TestClass()] 33 32 public class PartiallyMatchedCrossoverTest { 34 35 36 private TestContext testContextInstance;37 38 /// <summary>39 ///Gets or sets the test context which provides40 ///information about and functionality for the current test run.41 ///</summary>42 public TestContext TestContext {43 get {44 return testContextInstance;45 }46 set {47 testContextInstance = value;48 }49 }50 51 #region Additional test attributes52 //53 //You can use the following additional attributes as you write your tests:54 //55 //Use ClassInitialize to run code before running the first test in the class56 //[ClassInitialize()]57 //public static void MyClassInitialize(TestContext testContext)58 //{59 //}60 //61 //Use ClassCleanup to run code after all tests in a class have run62 //[ClassCleanup()]63 //public static void MyClassCleanup()64 //{65 //}66 //67 //Use TestInitialize to run code before running each test68 //[TestInitialize()]69 //public void MyTestInitialize()70 //{71 //}72 //73 //Use TestCleanup to run code after each test has run74 //[TestCleanup()]75 //public void MyTestCleanup()76 //{77 //}78 //79 #endregion80 81 82 33 /// <summary> 83 34 ///A test for Cross 84 35 ///</summary> 85 36 [TestMethod] 86 [DeploymentItem("HeuristicLab.Encodings.PermutationEncoding-3.3.dll")] 37 [TestCategory("Encodings.Permutation")] 38 [TestProperty("Time", "short")] 87 39 public void PartiallyMatchedCrossTest() { 88 40 TestRandom random = new TestRandom(); … … 95 47 target.Cross(random, new ItemArray<Permutation>(new Permutation[] { 96 48 new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4)})); 97 } 98 catch (System.InvalidOperationException) { 49 } catch (System.InvalidOperationException) { 99 50 exceptionFired = true; 100 51 } … … 106 57 ///</summary> 107 58 [TestMethod] 59 [TestCategory("Encodings.Permutation")] 60 [TestProperty("Time", "short")] 108 61 public void PartiallyMatchedCrossoverApplyTest() { 109 62 TestRandom random = new TestRandom(); … … 139 92 try { 140 93 PartiallyMatchedCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6)); 141 } 142 catch (System.ArgumentException) { 94 } catch (System.ArgumentException) { 143 95 exceptionFired = true; 144 96 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/PermutationEqualityComparerTest.cs
r9764 r9777 20 20 #endregion 21 21 22 using HeuristicLab.Encodings.PermutationEncoding;23 22 using Microsoft.VisualStudio.TestTools.UnitTesting; 24 23 … … 27 26 public class PermutationEqualityComparerTest { 28 27 [TestMethod] 28 [TestCategory("Encodings.Permutation")] 29 [TestProperty("Time", "short")] 29 30 public void TestPermutationEqualityComparer() { 30 31 PermutationEqualityComparer comparer = new PermutationEqualityComparer(); -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/PositionBasedCrossoverTest.cs
r9767 r9777 21 21 22 22 using HeuristicLab.Core; 23 using HeuristicLab.Encodings.PermutationEncoding;24 23 using HeuristicLab.Tests; 25 24 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 32 31 [TestClass()] 33 32 public class PositionBasedCrossoverTest { 34 35 36 private TestContext testContextInstance;37 38 /// <summary>39 ///Gets or sets the test context which provides40 ///information about and functionality for the current test run.41 ///</summary>42 public TestContext TestContext {43 get {44 return testContextInstance;45 }46 set {47 testContextInstance = value;48 }49 }50 51 #region Additional test attributes52 //53 //You can use the following additional attributes as you write your tests:54 //55 //Use ClassInitialize to run code before running the first test in the class56 //[ClassInitialize()]57 //public static void MyClassInitialize(TestContext testContext)58 //{59 //}60 //61 //Use ClassCleanup to run code after all tests in a class have run62 //[ClassCleanup()]63 //public static void MyClassCleanup()64 //{65 //}66 //67 //Use TestInitialize to run code before running each test68 //[TestInitialize()]69 //public void MyTestInitialize()70 //{71 //}72 //73 //Use TestCleanup to run code after each test has run74 //[TestCleanup()]75 //public void MyTestCleanup()76 //{77 //}78 //79 #endregion80 81 82 33 /// <summary> 83 34 ///A test for Cross 84 35 ///</summary> 85 36 [TestMethod] 86 [DeploymentItem("HeuristicLab.Encodings.PermutationEncoding-3.3.dll")] 37 [TestCategory("Encodings.Permutation")] 38 [TestProperty("Time", "short")] 87 39 public void PositionBasedCrossoverCrossTest() { 88 40 TestRandom random = new TestRandom(); … … 96 48 target.Cross(random, new ItemArray<Permutation>(new Permutation[] { 97 49 new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4) })); 98 } 99 catch (System.InvalidOperationException) { 50 } catch (System.InvalidOperationException) { 100 51 exceptionFired = true; 101 52 } … … 107 58 ///</summary> 108 59 [TestMethod] 109 [DeploymentItem("HeuristicLab.Encodings.PermutationEncoding-3.3.dll")] 60 [TestCategory("Encodings.Permutation")] 61 [TestProperty("Time", "short")] 110 62 public void PositionBasedCrossoverApplyTest() { 111 63 TestRandom random = new TestRandom(); … … 131 83 try { 132 84 PositionBasedCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6)); 133 } 134 catch (System.ArgumentException) { 85 } catch (System.ArgumentException) { 135 86 exceptionFired = true; 136 87 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/ScrambleManipulatorTest.cs
r9767 r9777 20 20 #endregion 21 21 22 using HeuristicLab.Encodings.PermutationEncoding;23 22 using HeuristicLab.Tests; 24 23 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 31 30 [TestClass()] 32 31 public class ScrambleManipulatorTest { 33 34 35 private TestContext testContextInstance;36 37 /// <summary>38 ///Gets or sets the test context which provides39 ///information about and functionality for the current test run.40 ///</summary>41 public TestContext TestContext {42 get {43 return testContextInstance;44 }45 set {46 testContextInstance = value;47 }48 }49 50 #region Additional test attributes51 //52 //You can use the following additional attributes as you write your tests:53 //54 //Use ClassInitialize to run code before running the first test in the class55 //[ClassInitialize()]56 //public static void MyClassInitialize(TestContext testContext)57 //{58 //}59 //60 //Use ClassCleanup to run code after all tests in a class have run61 //[ClassCleanup()]62 //public static void MyClassCleanup()63 //{64 //}65 //66 //Use TestInitialize to run code before running each test67 //[TestInitialize()]68 //public void MyTestInitialize()69 //{70 //}71 //72 //Use TestCleanup to run code after each test has run73 //[TestCleanup()]74 //public void MyTestCleanup()75 //{76 //}77 //78 #endregion79 80 81 32 /// <summary> 82 33 ///A test for Apply 83 34 ///</summary> 84 35 [TestMethod] 36 [TestCategory("Encodings.Permutation")] 37 [TestProperty("Time", "short")] 85 38 public void ScrambleManipulatorApplyTest() { 86 39 TestRandom random = new TestRandom(); -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/Swap2ManipulatorTest.cs
r9767 r9777 20 20 #endregion 21 21 22 using HeuristicLab.Encodings.PermutationEncoding;23 22 using HeuristicLab.Tests; 24 23 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 31 30 [TestClass()] 32 31 public class Swap2ManipulatorTest { 33 34 35 private TestContext testContextInstance;36 37 /// <summary>38 ///Gets or sets the test context which provides39 ///information about and functionality for the current test run.40 ///</summary>41 public TestContext TestContext {42 get {43 return testContextInstance;44 }45 set {46 testContextInstance = value;47 }48 }49 50 #region Additional test attributes51 //52 //You can use the following additional attributes as you write your tests:53 //54 //Use ClassInitialize to run code before running the first test in the class55 //[ClassInitialize()]56 //public static void MyClassInitialize(TestContext testContext)57 //{58 //}59 //60 //Use ClassCleanup to run code after all tests in a class have run61 //[ClassCleanup()]62 //public static void MyClassCleanup()63 //{64 //}65 //66 //Use TestInitialize to run code before running each test67 //[TestInitialize()]68 //public void MyTestInitialize()69 //{70 //}71 //72 //Use TestCleanup to run code after each test has run73 //[TestCleanup()]74 //public void MyTestCleanup()75 //{76 //}77 //78 #endregion79 80 81 32 /// <summary> 82 33 ///A test for Apply 83 34 ///</summary> 84 35 [TestMethod] 36 [TestCategory("Encodings.Permutation")] 37 [TestProperty("Time", "short")] 85 38 public void Swap2ManipulatorApplyTest() { 86 39 TestRandom random = new TestRandom(); -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/Swap3ManipulatorTest.cs
r9767 r9777 20 20 #endregion 21 21 22 using HeuristicLab.Encodings.PermutationEncoding;23 22 using HeuristicLab.Tests; 24 23 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 31 30 [TestClass()] 32 31 public class Swap3ManipulatorTest { 33 34 35 private TestContext testContextInstance;36 37 /// <summary>38 ///Gets or sets the test context which provides39 ///information about and functionality for the current test run.40 ///</summary>41 public TestContext TestContext {42 get {43 return testContextInstance;44 }45 set {46 testContextInstance = value;47 }48 }49 50 #region Additional test attributes51 //52 //You can use the following additional attributes as you write your tests:53 //54 //Use ClassInitialize to run code before running the first test in the class55 //[ClassInitialize()]56 //public static void MyClassInitialize(TestContext testContext)57 //{58 //}59 //60 //Use ClassCleanup to run code after all tests in a class have run61 //[ClassCleanup()]62 //public static void MyClassCleanup()63 //{64 //}65 //66 //Use TestInitialize to run code before running each test67 //[TestInitialize()]68 //public void MyTestInitialize()69 //{70 //}71 //72 //Use TestCleanup to run code after each test has run73 //[TestCleanup()]74 //public void MyTestCleanup()75 //{76 //}77 //78 #endregion79 80 81 32 /// <summary> 82 33 ///A test for Apply 83 34 ///</summary> 84 35 [TestMethod] 36 [TestCategory("Encodings.Permutation")] 37 [TestProperty("Time", "short")] 85 38 public void Swap3ManipulatorApplyTest() { 86 39 TestRandom random = new TestRandom(); -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/TranslocationInversionManipulatorTest.cs
r9767 r9777 20 20 #endregion 21 21 22 using HeuristicLab.Encodings.PermutationEncoding;23 22 using HeuristicLab.Tests; 24 23 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 31 30 [TestClass()] 32 31 public class TranslocationInversionManipulatorTest { 33 34 35 private TestContext testContextInstance;36 37 /// <summary>38 ///Gets or sets the test context which provides39 ///information about and functionality for the current test run.40 ///</summary>41 public TestContext TestContext {42 get {43 return testContextInstance;44 }45 set {46 testContextInstance = value;47 }48 }49 50 #region Additional test attributes51 //52 //You can use the following additional attributes as you write your tests:53 //54 //Use ClassInitialize to run code before running the first test in the class55 //[ClassInitialize()]56 //public static void MyClassInitialize(TestContext testContext)57 //{58 //}59 //60 //Use ClassCleanup to run code after all tests in a class have run61 //[ClassCleanup()]62 //public static void MyClassCleanup()63 //{64 //}65 //66 //Use TestInitialize to run code before running each test67 //[TestInitialize()]68 //public void MyTestInitialize()69 //{70 //}71 //72 //Use TestCleanup to run code after each test has run73 //[TestCleanup()]74 //public void MyTestCleanup()75 //{76 //}77 //78 #endregion79 80 81 32 /// <summary> 82 33 ///A test for Apply 83 34 ///</summary> 84 35 [TestMethod] 36 [TestCategory("Encodings.Permutation")] 37 [TestProperty("Time", "short")] 85 38 public void TranslocationInversionManipulatorApplyTest() { 86 39 TestRandom random = new TestRandom(); -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/TranslocationManipulatorTest.cs
r9767 r9777 20 20 #endregion 21 21 22 using HeuristicLab.Encodings.PermutationEncoding;23 22 using HeuristicLab.Tests; 24 23 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 31 30 [TestClass()] 32 31 public class TranslocationManipulatorTest { 33 34 35 private TestContext testContextInstance;36 37 /// <summary>38 ///Gets or sets the test context which provides39 ///information about and functionality for the current test run.40 ///</summary>41 public TestContext TestContext {42 get {43 return testContextInstance;44 }45 set {46 testContextInstance = value;47 }48 }49 50 #region Additional test attributes51 //52 //You can use the following additional attributes as you write your tests:53 //54 //Use ClassInitialize to run code before running the first test in the class55 //[ClassInitialize()]56 //public static void MyClassInitialize(TestContext testContext)57 //{58 //}59 //60 //Use ClassCleanup to run code after all tests in a class have run61 //[ClassCleanup()]62 //public static void MyClassCleanup()63 //{64 //}65 //66 //Use TestInitialize to run code before running each test67 //[TestInitialize()]68 //public void MyTestInitialize()69 //{70 //}71 //72 //Use TestCleanup to run code after each test has run73 //[TestCleanup()]74 //public void MyTestCleanup()75 //{76 //}77 //78 #endregion79 80 81 32 /// <summary> 82 33 ///A test for Apply 83 34 ///</summary> 84 35 [TestMethod] 36 [TestCategory("Encodings.Permutation")] 37 [TestProperty("Time", "short")] 85 38 public void TranslocationManipulatorApplyTest() { 86 39 TestRandom random = new TestRandom(); -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/UniformLikeCrossoverTest.cs
r9767 r9777 21 21 22 22 using HeuristicLab.Core; 23 using HeuristicLab.Encodings.PermutationEncoding;24 23 using HeuristicLab.Tests; 25 24 using Microsoft.VisualStudio.TestTools.UnitTesting; 26 25 27 26 namespace HeuristicLab.Encodings.PermutationEncoding.Tests { 28 29 30 27 /// <summary> 31 28 ///This is a test class for UniformLikeCrossoverTest and is intended … … 34 31 [TestClass()] 35 32 public class UniformLikeCrossoverTest { 36 37 38 private TestContext testContextInstance;39 40 /// <summary>41 ///Gets or sets the test context which provides42 ///information about and functionality for the current test run.43 ///</summary>44 public TestContext TestContext {45 get {46 return testContextInstance;47 }48 set {49 testContextInstance = value;50 }51 }52 53 #region Additional test attributes54 //55 //You can use the following additional attributes as you write your tests:56 //57 //Use ClassInitialize to run code before running the first test in the class58 //[ClassInitialize()]59 //public static void MyClassInitialize(TestContext testContext)60 //{61 //}62 //63 //Use ClassCleanup to run code after all tests in a class have run64 //[ClassCleanup()]65 //public static void MyClassCleanup()66 //{67 //}68 //69 //Use TestInitialize to run code before running each test70 //[TestInitialize()]71 //public void MyTestInitialize()72 //{73 //}74 //75 //Use TestCleanup to run code after each test has run76 //[TestCleanup()]77 //public void MyTestCleanup()78 //{79 //}80 //81 #endregion82 83 84 33 /// <summary> 85 34 ///A test for Apply 86 35 ///</summary> 87 36 [TestMethod] 37 [TestCategory("Encodings.Permutation")] 38 [TestProperty("Time", "short")] 88 39 public void UniformLikeCrossoverApplyTest() { 89 40 // test from the paper … … 108 59 ///</summary> 109 60 [TestMethod] 61 [TestCategory("Encodings.Permutation")] 62 [TestProperty("Time", "short")] 110 63 [DeploymentItem("HeuristicLab.Encodings.PermutationEncoding-3.3.dll")] 111 64 public void UniformLikeCrossoverCrossTest() {
Note: See TracChangeset
for help on using the changeset viewer.