Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/20/13 17:03:31 (11 years ago)
Author:
mkommend
Message:

#2088: Merged all changesets regarding the unit test restructuring in the stable branch.

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Tests

  • stable/HeuristicLab.Tests/HeuristicLab.Encodings.BinaryVectorEncoding-3.3/UniformCrossoverTest.cs

    r9456 r9885  
    2121
    2222using HeuristicLab.Core;
    23 using HeuristicLab.Encodings.BinaryVectorEncoding;
    2423using HeuristicLab.Tests;
    2524using Microsoft.VisualStudio.TestTools.UnitTesting;
    2625
    27 namespace HeuristicLab.Encodings.BinaryVectorEncoding_33.Tests {
    28 
    29 
     26namespace HeuristicLab.Encodings.BinaryVectorEncoding.Tests {
    3027  /// <summary>
    3128  ///This is a test class for SinglePointCrossoverTest and is intended
     
    3431  [TestClass()]
    3532  public class UniformCrossoverTest {
    36 
    37 
    38     private TestContext testContextInstance;
    39 
    40     /// <summary>
    41     ///Gets or sets the test context which provides
    42     ///information about and functionality for the current test run.
    43     ///</summary>
    44     public TestContext TestContext {
    45       get {
    46         return testContextInstance;
    47       }
    48       set {
    49         testContextInstance = value;
    50       }
    51     }
    52 
    53     #region Additional test attributes
    54     //
    55     //You can use the following additional attributes as you write your tests:
    56     //
    57     //Use ClassInitialize to run code before running the first test in the class
    58     //[ClassInitialize()]
    59     //public static void MyClassInitialize(TestContext testContext)
    60     //{
    61     //}
    62     //
    63     //Use ClassCleanup to run code after all tests in a class have run
    64     //[ClassCleanup()]
    65     //public static void MyClassCleanup()
    66     //{
    67     //}
    68     //
    69     //Use TestInitialize to run code before running each test
    70     //[TestInitialize()]
    71     //public void MyTestInitialize()
    72     //{
    73     //}
    74     //
    75     //Use TestCleanup to run code after each test has run
    76     //[TestCleanup()]
    77     //public void MyTestCleanup()
    78     //{
    79     //}
    80     //
    81     #endregion
    82 
    8333    /// <summary>
    8434    ///A test for Cross
    8535    ///</summary>
    86     [TestMethod()]
    87     [DeploymentItem("HeuristicLab.Encodings.BinaryVectorEncoding-3.3.dll")]
     36    [TestMethod]
     37    [TestCategory("Encodings.BinaryVector")]
     38    [TestProperty("Time", "short")]
    8839    public void SinglePointCrossoverCrossTest() {
    8940      UniformCrossover_Accessor target = new UniformCrossover_Accessor(new PrivateObject(typeof(UniformCrossover)));
     
    9849        BinaryVector actual;
    9950        actual = target.Cross(random, parents);
    100       }
    101       catch (System.ArgumentException) {
     51      } catch (System.ArgumentException) {
    10252        exceptionFired = true;
    10353      }
     
    11060        BinaryVector actual;
    11161        actual = target.Cross(random, parents);
    112       }
    113       catch (System.ArgumentException) {
     62      } catch (System.ArgumentException) {
    11463        exceptionFired = true;
    11564      }
     
    12069    ///A test for Apply
    12170    ///</summary>
    122     [TestMethod()]
     71    [TestMethod]
     72    [TestCategory("Encodings.BinaryVector")]
     73    [TestProperty("Time", "short")]
    12374    public void SinglePointCrossoverApplyTest() {
    12475      TestRandom random = new TestRandom();
     
    151102      try {
    152103        actual = UniformCrossover.Apply(random, parent1, parent2);
    153       }
    154       catch (System.ArgumentException) {
     104      } catch (System.ArgumentException) {
    155105        exceptionFired = true;
    156106      }
    157107      Assert.IsTrue(exceptionFired);
    158108    }
    159 
    160     /// <summary>
    161     ///A test for SinglePointCrossover Constructor
    162     ///</summary>
    163     [TestMethod()]
    164     public void SinglePointCrossoverConstructorTest() {
    165       NPointCrossover target = new NPointCrossover();
    166     }
    167109  }
    168110}
Note: See TracChangeset for help on using the changeset viewer.