Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/17/15 19:45:30 (8 years ago)
Author:
ascheibe
Message:

#2510 adapted unit tests to VS 2015

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/PartiallyMatchedCrossoverTest.cs

    r12012 r13235  
    2020#endregion
    2121
    22 using HeuristicLab.Core;
    2322using HeuristicLab.Tests;
    2423using Microsoft.VisualStudio.TestTools.UnitTesting;
     
    3130  [TestClass()]
    3231  public class PartiallyMatchedCrossoverTest {
    33     /// <summary>
    34     ///A test for Cross
    35     ///</summary>
    36     [TestMethod]
    37     [TestCategory("Encodings.Permutation")]
    38     [TestProperty("Time", "short")]
    39     public void PartiallyMatchedCrossTest() {
    40       TestRandom random = new TestRandom();
    41       PartiallyMatchedCrossover_Accessor target =
    42         new PartiallyMatchedCrossover_Accessor(new PrivateObject(typeof(PartiallyMatchedCrossover)));
    43       // perform a test with more than two parents
    44       random.Reset();
    45       bool exceptionFired = false;
    46       try {
    47         target.Cross(random, new ItemArray<Permutation>(new Permutation[] {
    48           new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4)}));
    49       } catch (System.InvalidOperationException) {
    50         exceptionFired = true;
    51       }
    52       Assert.IsTrue(exceptionFired);
    53     }
    54 
    5532    /// <summary>
    5633    ///A test for Apply
     
    9269      try {
    9370        PartiallyMatchedCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6));
    94       } catch (System.ArgumentException) {
     71      }
     72      catch (System.ArgumentException) {
    9573        exceptionFired = true;
    9674      }
Note: See TracChangeset for help on using the changeset viewer.