Changeset 4068 for trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/CosaCrossoverTest.cs
- Timestamp:
- 07/22/10 00:44:01 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/CosaCrossoverTest.cs
r3376 r4068 20 20 #endregion 21 21 22 using HeuristicLab.Common;23 22 using HeuristicLab.Core; 23 using HeuristicLab.Encodings.PermutationEncoding; 24 24 using Microsoft.VisualStudio.TestTools.UnitTesting; 25 using HeuristicLab.Encodings.PermutationEncoding;26 25 27 26 namespace HeuristicLab.Encodings.PermutationEncoding_33.Tests { 28 29 30 31 27 /// <summary> 28 ///This is a test class for CosaCrossoverTest and is intended 29 ///to contain all CosaCrossoverTest Unit Tests 30 ///</summary> 32 31 [TestClass()] 33 32 public class CosaCrossoverTest { … … 87 86 public void CosaCrossoverCrossTest() { 88 87 TestRandom random = new TestRandom(); 89 CosaCrossover_Accessor target = 88 CosaCrossover_Accessor target = 90 89 new CosaCrossover_Accessor(new PrivateObject(typeof(CosaCrossover))); 91 90 // perform a test with more than two parents … … 95 94 target.Cross(random, new ItemArray<Permutation>(new Permutation[] { 96 95 new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4)})); 97 } catch (System.InvalidOperationException) { 96 } 97 catch (System.InvalidOperationException) { 98 98 exceptionFired = true; 99 99 } … … 144 144 Assert.IsTrue(actual.Validate()); 145 145 Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual)); 146 146 147 147 // perform a test when the two permutations are of unequal length 148 148 random.Reset(); … … 150 150 try { 151 151 CosaCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6)); 152 } catch (System.ArgumentException) { 152 } 153 catch (System.ArgumentException) { 153 154 exceptionFired = true; 154 155 }
Note: See TracChangeset
for help on using the changeset viewer.