Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/26/13 13:25:19 (11 years ago)
Author:
abeham
Message:

#2088: Added test attributes and cleaned up tests of the encodings

File:
1 edited

Legend:

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

    r9767 r9777  
    2121
    2222using HeuristicLab.Core;
    23 using HeuristicLab.Encodings.PermutationEncoding;
    2423using HeuristicLab.Tests;
    2524using Microsoft.VisualStudio.TestTools.UnitTesting;
     
    3231  [TestClass()]
    3332  public class PositionBasedCrossoverTest {
    34 
    35 
    36     private TestContext testContextInstance;
    37 
    38     /// <summary>
    39     ///Gets or sets the test context which provides
    40     ///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 attributes
    52     //
    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 class
    56     //[ClassInitialize()]
    57     //public static void MyClassInitialize(TestContext testContext)
    58     //{
    59     //}
    60     //
    61     //Use ClassCleanup to run code after all tests in a class have run
    62     //[ClassCleanup()]
    63     //public static void MyClassCleanup()
    64     //{
    65     //}
    66     //
    67     //Use TestInitialize to run code before running each test
    68     //[TestInitialize()]
    69     //public void MyTestInitialize()
    70     //{
    71     //}
    72     //
    73     //Use TestCleanup to run code after each test has run
    74     //[TestCleanup()]
    75     //public void MyTestCleanup()
    76     //{
    77     //}
    78     //
    79     #endregion
    80 
    81 
    8233    /// <summary>
    8334    ///A test for Cross
    8435    ///</summary>
    8536    [TestMethod]
    86     [DeploymentItem("HeuristicLab.Encodings.PermutationEncoding-3.3.dll")]
     37    [TestCategory("Encodings.Permutation")]
     38    [TestProperty("Time", "short")]
    8739    public void PositionBasedCrossoverCrossTest() {
    8840      TestRandom random = new TestRandom();
     
    9648        target.Cross(random, new ItemArray<Permutation>(new Permutation[] {
    9749          new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4) }));
    98       }
    99       catch (System.InvalidOperationException) {
     50      } catch (System.InvalidOperationException) {
    10051        exceptionFired = true;
    10152      }
     
    10758    ///</summary>
    10859    [TestMethod]
    109     [DeploymentItem("HeuristicLab.Encodings.PermutationEncoding-3.3.dll")]
     60    [TestCategory("Encodings.Permutation")]
     61    [TestProperty("Time", "short")]
    11062    public void PositionBasedCrossoverApplyTest() {
    11163      TestRandom random = new TestRandom();
     
    13183      try {
    13284        PositionBasedCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6));
    133       }
    134       catch (System.ArgumentException) {
     85      } catch (System.ArgumentException) {
    13586        exceptionFired = true;
    13687      }
Note: See TracChangeset for help on using the changeset viewer.