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:
6 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Tests

  • stable/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3/Auxiliary.cs

    r9456 r9885  
    2020#endregion
    2121
    22 using HeuristicLab.Encodings.IntegerVectorEncoding;
    23 
    24 namespace HeuristicLab.Encodings.IntegerVectorEncoding_33.Tests {
     22namespace HeuristicLab.Encodings.IntegerVectorEncoding.Tests {
    2523  public static class Auxiliary {
    2624    public static bool IntegerVectorIsEqualByPosition(IntegerVector p1, IntegerVector p2) {
  • stable/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3/DiscreteCrossoverTest.cs

    r9456 r9885  
    2121
    2222using HeuristicLab.Core;
    23 using HeuristicLab.Encodings.IntegerVectorEncoding;
    2423using HeuristicLab.Tests;
    2524using Microsoft.VisualStudio.TestTools.UnitTesting;
    2625
    27 namespace HeuristicLab.Encodings.IntegerVectorEncoding_33.Tests {
    28 
    29 
     26namespace HeuristicLab.Encodings.IntegerVectorEncoding.Tests {
    3027  /// <summary>
    3128  ///This is a test class for DiscreteCrossoverTest and is intended
     
    3431  [TestClass()]
    3532  public class DiscreteCrossoverTest {
    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.IntegerVectorEncoding-3.3.dll")]
     36    [TestMethod]
     37    [TestCategory("Encodings.IntegerVector")]
     38    [TestProperty("Time", "short")]
    8839    public void DiscreteCrossoverCrossTest() {
    8940      DiscreteCrossover_Accessor target = new DiscreteCrossover_Accessor(new PrivateObject(typeof(DiscreteCrossover)));
     
    9849        IntegerVector actual;
    9950        actual = target.Cross(random, parents);
    100       }
    101       catch (System.ArgumentException) {
     51      } catch (System.ArgumentException) {
    10252        exceptionFired = true;
    10353      }
     
    10858    ///A test for Apply
    10959    ///</summary>
    110     [TestMethod()]
     60    [TestMethod]
     61    [TestCategory("Encodings.IntegerVector")]
     62    [TestProperty("Time", "short")]
    11163    public void DiscreteCrossoverApplyTest() {
    11264      TestRandom random = new TestRandom();
     
    13082      try {
    13183        actual = DiscreteCrossover.Apply(random, new ItemArray<IntegerVector>(new IntegerVector[] { parent1, parent2 }));
    132       }
    133       catch (System.ArgumentException) {
     84      } catch (System.ArgumentException) {
    13485        exceptionFired = true;
    13586      }
    13687      Assert.IsTrue(exceptionFired);
    13788    }
    138 
    139     /// <summary>
    140     ///A test for DiscreteCrossover Constructor
    141     ///</summary>
    142     [TestMethod()]
    143     public void DiscreteCrossoverConstructorTest() {
    144       DiscreteCrossover target = new DiscreteCrossover();
    145     }
    14689  }
    14790}
  • stable/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3/SinglePointCrossoverTest.cs

    r9456 r9885  
    2121
    2222using HeuristicLab.Core;
    23 using HeuristicLab.Encodings.IntegerVectorEncoding;
    2423using HeuristicLab.Tests;
    2524using Microsoft.VisualStudio.TestTools.UnitTesting;
    2625
    27 namespace HeuristicLab.Encodings.IntegerVectorEncoding_33.Tests {
    28 
    29 
     26namespace HeuristicLab.Encodings.IntegerVectorEncoding.Tests {
    3027  /// <summary>
    3128  ///This is a test class for SinglePointCrossoverTest and is intended
     
    3431  [TestClass()]
    3532  public class SinglePointCrossoverTest {
    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.IntegerVectorEncoding-3.3.dll")]
     36    [TestMethod]
     37    [TestCategory("Encodings.IntegerVector")]
     38    [TestProperty("Time", "short")]
    8839    public void SinglePointCrossoverCrossTest() {
    8940      SinglePointCrossover_Accessor target = new SinglePointCrossover_Accessor(new PrivateObject(typeof(SinglePointCrossover)));
     
    9849        IntegerVector actual;
    9950        actual = target.Cross(random, parents);
    100       }
    101       catch (System.ArgumentException) {
     51      } catch (System.ArgumentException) {
    10252        exceptionFired = true;
    10353      }
     
    11060        IntegerVector 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.IntegerVector")]
     73    [TestProperty("Time", "short")]
    12374    public void SinglePointCrossoverApplyTest() {
    12475      TestRandom random = new TestRandom();
     
    14192      try {
    14293        actual = SinglePointCrossover.Apply(random, parent1, parent2);
    143       }
    144       catch (System.ArgumentException) {
     94      } catch (System.ArgumentException) {
    14595        exceptionFired = true;
    14696      }
    14797      Assert.IsTrue(exceptionFired);
    14898    }
    149 
    150     /// <summary>
    151     ///A test for SinglePointCrossover Constructor
    152     ///</summary>
    153     [TestMethod()]
    154     public void SinglePointCrossoverConstructorTest() {
    155       SinglePointCrossover target = new SinglePointCrossover();
    156     }
    15799  }
    158100}
  • stable/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3/UniformOnePositionManipulatorTest.cs

    r9456 r9885  
    2121
    2222using HeuristicLab.Data;
    23 using HeuristicLab.Encodings.IntegerVectorEncoding;
    2423using HeuristicLab.Tests;
    2524using Microsoft.VisualStudio.TestTools.UnitTesting;
    2625
    27 namespace HeuristicLab.Encodings.IntegerVectorEncoding_33.Tests {
     26namespace HeuristicLab.Encodings.IntegerVectorEncoding.Tests {
    2827  /// <summary>
    2928  ///This is a test class for UniformOnePositionManipulator and is intended
     
    3231  [TestClass()]
    3332  public class UniformOnePositionManipulatorTest {
    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 Apply
    8435    ///</summary>
    8536    [TestMethod()]
     37    [TestCategory("Encodings.IntegerVector")]
     38    [TestProperty("Time", "short")]
    8639    public void UniformOnePositionManipulatorApplyTest() {
    8740      TestRandom random = new TestRandom();
     
    9851      Assert.IsTrue(Auxiliary.IntegerVectorIsEqualByPosition(expected, parent));
    9952    }
    100 
    101     /// <summary>
    102     ///A test for UniformOnePositionManipulator Constructor
    103     ///</summary>
    104     [TestMethod()]
    105     public void UniformOnePositionManipulatorConstructorTest() {
    106       UniformOnePositionManipulator target = new UniformOnePositionManipulator();
    107     }
    10853  }
    10954}
Note: See TracChangeset for help on using the changeset viewer.