Changeset 9777 for trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/CyclicCrossover2Test.cs
- Timestamp:
- 07/26/13 13:25:19 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.