Changeset 13246 for stable/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/OrderCrossover2Test.cs
- Timestamp:
- 11/18/15 13:01:38 (8 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 13227,13235-13236
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Tests
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Tests merged: 13227,13235-13236
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/OrderCrossover2Test.cs
r12009 r13246 20 20 #endregion 21 21 22 using HeuristicLab.Core;23 22 using HeuristicLab.Tests; 24 23 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 31 30 [TestClass()] 32 31 public class OrderCrossover2Test { 33 /// <summary>34 ///A test for Cross35 ///</summary>36 [TestMethod]37 [TestCategory("Encodings.Permutation")]38 [TestProperty("Time", "short")]39 public void OrderCrossover2CrossTest() {40 TestRandom random = new TestRandom();41 OrderCrossover2_Accessor target = new OrderCrossover2_Accessor(new PrivateObject(typeof(OrderCrossover2)));42 random.Reset();43 bool exceptionFired = false;44 try {45 target.Cross(random, new ItemArray<Permutation>(new Permutation[] {46 new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4)}));47 } catch (System.InvalidOperationException) {48 exceptionFired = true;49 }50 Assert.IsTrue(exceptionFired);51 }52 53 32 /// <summary> 54 33 ///A test for Apply … … 78 57 try { 79 58 OrderCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6)); 80 } catch (System.ArgumentException) { 59 } 60 catch (System.ArgumentException) { 81 61 exceptionFired = true; 82 62 }
Note: See TracChangeset
for help on using the changeset viewer.