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

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Tests

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

    r9456 r9885  
    2020#endregion
    2121
    22 using HeuristicLab.Encodings.BinaryVectorEncoding;
    23 
    24 namespace HeuristicLab.Encodings.BinaryVectorEncoding_33.Tests {
     22namespace HeuristicLab.Encodings.BinaryVectorEncoding.Tests {
    2523  public static class Auxiliary {
    2624    public static bool BinaryVectorIsEqualByPosition(BinaryVector p1, BinaryVector p2) {
  • stable/HeuristicLab.Tests/HeuristicLab.Encodings.BinaryVectorEncoding-3.3/NPointCrossoverTest.cs

    r9456 r9885  
    2222using HeuristicLab.Core;
    2323using HeuristicLab.Data;
    24 using HeuristicLab.Encodings.BinaryVectorEncoding;
    2524using HeuristicLab.Tests;
    2625using Microsoft.VisualStudio.TestTools.UnitTesting;
    2726
    28 namespace HeuristicLab.Encodings.BinaryVectorEncoding_33.Tests {
    29 
    30 
     27namespace HeuristicLab.Encodings.BinaryVectorEncoding.Tests {
    3128  /// <summary>
    3229  ///This is a test class for SinglePointCrossoverTest and is intended
     
    3532  [TestClass()]
    3633  public class NPointCrossoverTest {
    37 
    38 
    39     private TestContext testContextInstance;
    40 
    41     /// <summary>
    42     ///Gets or sets the test context which provides
    43     ///information about and functionality for the current test run.
    44     ///</summary>
    45     public TestContext TestContext {
    46       get {
    47         return testContextInstance;
    48       }
    49       set {
    50         testContextInstance = value;
    51       }
    52     }
    53 
    54     #region Additional test attributes
    55     //
    56     //You can use the following additional attributes as you write your tests:
    57     //
    58     //Use ClassInitialize to run code before running the first test in the class
    59     //[ClassInitialize()]
    60     //public static void MyClassInitialize(TestContext testContext)
    61     //{
    62     //}
    63     //
    64     //Use ClassCleanup to run code after all tests in a class have run
    65     //[ClassCleanup()]
    66     //public static void MyClassCleanup()
    67     //{
    68     //}
    69     //
    70     //Use TestInitialize to run code before running each test
    71     //[TestInitialize()]
    72     //public void MyTestInitialize()
    73     //{
    74     //}
    75     //
    76     //Use TestCleanup to run code after each test has run
    77     //[TestCleanup()]
    78     //public void MyTestCleanup()
    79     //{
    80     //}
    81     //
    82     #endregion
    83 
    8434    /// <summary>
    8535    ///A test for Cross
    8636    ///</summary>
    87     [TestMethod()]
    88     [DeploymentItem("HeuristicLab.Encodings.BinaryVectorEncoding-3.3.dll")]
     37    [TestMethod]
     38    [TestCategory("Encodings.BinaryVector")]
     39    [TestProperty("Time", "short")]
    8940    public void NPointCrossoverCrossTest() {
    9041      NPointCrossover_Accessor target = new NPointCrossover_Accessor(new PrivateObject(typeof(NPointCrossover)));
     
    9950        BinaryVector actual;
    10051        actual = target.Cross(random, parents);
    101       }
    102       catch (System.ArgumentException) {
     52      } catch (System.ArgumentException) {
    10353        exceptionFired = true;
    10454      }
     
    11161        BinaryVector actual;
    11262        actual = target.Cross(random, parents);
    113       }
    114       catch (System.ArgumentException) {
     63      } catch (System.ArgumentException) {
    11564        exceptionFired = true;
    11665      }
     
    12170    ///A test for Apply
    12271    ///</summary>
    123     [TestMethod()]
     72    [TestMethod]
     73    [TestCategory("Encodings.BinaryVector")]
     74    [TestProperty("Time", "short")]
    12475    public void NPointCrossoverApplyTest() {
    12576      TestRandom random = new TestRandom();
     
    165116      try {
    166117        actual = NPointCrossover.Apply(random, parent1, parent2, n);
    167       }
    168       catch (System.ArgumentException) {
     118      } catch (System.ArgumentException) {
    169119        exceptionFired = true;
    170120      }
    171121      Assert.IsTrue(exceptionFired);
    172122    }
    173 
    174     /// <summary>
    175     ///A test for SinglePointCrossover Constructor
    176     ///</summary>
    177     [TestMethod()]
    178     public void NPointCrossoverConstructorTest() {
    179       NPointCrossover target = new NPointCrossover();
    180     }
    181123  }
    182124}
  • stable/HeuristicLab.Tests/HeuristicLab.Encodings.BinaryVectorEncoding-3.3/SinglePointCrossoverTest.cs

    r9456 r9885  
    2020#endregion
    2121
     22using System;
    2223using HeuristicLab.Core;
    23 using HeuristicLab.Encodings.BinaryVectorEncoding;
    2424using HeuristicLab.Tests;
    2525using Microsoft.VisualStudio.TestTools.UnitTesting;
    2626
    27 namespace HeuristicLab.Encodings.BinaryVectorEncoding_33.Tests {
    28 
    29 
     27namespace HeuristicLab.Encodings.BinaryVectorEncoding.Tests {
    3028  /// <summary>
    3129  ///This is a test class for SinglePointCrossoverTest and is intended
     
    3432  [TestClass()]
    3533  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 
    8334    /// <summary>
    8435    ///A test for Cross
    8536    ///</summary>
    86     [TestMethod()]
    87     [DeploymentItem("HeuristicLab.Encodings.BinaryVectorEncoding-3.3.dll")]
     37    [TestMethod]
     38    [TestCategory("Encodings.BinaryVector")]
     39    [TestProperty("Time", "short")]
    8840    public void SinglePointCrossoverCrossTest() {
    8941      SinglePointCrossover_Accessor target = new SinglePointCrossover_Accessor(new PrivateObject(typeof(SinglePointCrossover)));
     
    9850        BinaryVector actual;
    9951        actual = target.Cross(random, parents);
    100       }
    101       catch (System.ArgumentException) {
     52      } catch (ArgumentException) {
    10253        exceptionFired = true;
    10354      }
     
    11061        BinaryVector actual;
    11162        actual = target.Cross(random, parents);
    112       }
    113       catch (System.ArgumentException) {
     63      } catch (ArgumentException) {
    11464        exceptionFired = true;
    11565      }
    11666      Assert.IsTrue(exceptionFired);
    11767    }
    118 
    119     /// <summary>
    120     ///A test for SinglePointCrossover Constructor
    121     ///</summary>
    122     [TestMethod()]
    123     public void SinglePointCrossoverConstructorTest() {
    124       SinglePointCrossover target = new SinglePointCrossover();
    125     }
    12668  }
    12769}
  • stable/HeuristicLab.Tests/HeuristicLab.Encodings.BinaryVectorEncoding-3.3/SinglePositionBitflipManipulatorTest.cs

    r9456 r9885  
    2020#endregion
    2121
    22 using HeuristicLab.Encodings.BinaryVectorEncoding;
    2322using HeuristicLab.Tests;
    2423using Microsoft.VisualStudio.TestTools.UnitTesting;
    2524
    26 namespace HeuristicLab.Encodings.BinaryVectorEncoding_33.Tests {
     25namespace HeuristicLab.Encodings.BinaryVectorEncoding.Tests {
    2726  /// <summary>
    2827  ///This is a test class for SinglePositionBitflipManipulator and is intended
     
    3130  [TestClass()]
    3231  public class SinglePositionBitflipManipulatorTest {
    33 
    34 
    35     private TestContext testContextInstance;
    36 
    37     /// <summary>
    38     ///Gets or sets the test context which provides
    39     ///information about and functionality for the current test run.
    40     ///</summary>
    41     public TestContext TestContext {
    42       get {
    43         return testContextInstance;
    44       }
    45       set {
    46         testContextInstance = value;
    47       }
    48     }
    49 
    50     #region Additional test attributes
    51     //
    52     //You can use the following additional attributes as you write your tests:
    53     //
    54     //Use ClassInitialize to run code before running the first test in the class
    55     //[ClassInitialize()]
    56     //public static void MyClassInitialize(TestContext testContext)
    57     //{
    58     //}
    59     //
    60     //Use ClassCleanup to run code after all tests in a class have run
    61     //[ClassCleanup()]
    62     //public static void MyClassCleanup()
    63     //{
    64     //}
    65     //
    66     //Use TestInitialize to run code before running each test
    67     //[TestInitialize()]
    68     //public void MyTestInitialize()
    69     //{
    70     //}
    71     //
    72     //Use TestCleanup to run code after each test has run
    73     //[TestCleanup()]
    74     //public void MyTestCleanup()
    75     //{
    76     //}
    77     //
    78     #endregion
    79 
    80 
    8132    /// <summary>
    8233    ///A test for Apply
    8334    ///</summary>
    84     [TestMethod()]
     35    [TestMethod]
     36    [TestCategory("Encodings.BinaryVector")]
     37    [TestProperty("Time", "short")]
    8538    public void SinglePositionBitflipManipulatorApplyTest() {
    8639      TestRandom random = new TestRandom();
     
    9649      Assert.IsTrue(Auxiliary.BinaryVectorIsEqualByPosition(expected, parent));
    9750    }
    98 
    99     /// <summary>
    100     ///A test for SinglePositionBitflipManipulator Constructor
    101     ///</summary>
    102     [TestMethod()]
    103     public void SinglePositionBitflipManipulatorConstructorTest() {
    104       SinglePositionBitflipManipulator target = new SinglePositionBitflipManipulator();
    105     }
    10651  }
    10752}
  • stable/HeuristicLab.Tests/HeuristicLab.Encodings.BinaryVectorEncoding-3.3/SomePositionsBitflipManipulatorTest.cs

    r9456 r9885  
    2121
    2222using HeuristicLab.Data;
    23 using HeuristicLab.Encodings.BinaryVectorEncoding;
    2423using HeuristicLab.Tests;
    2524using Microsoft.VisualStudio.TestTools.UnitTesting;
    2625
    27 namespace HeuristicLab.Encodings.BinaryVectorEncoding_33.Tests {
     26namespace HeuristicLab.Encodings.BinaryVectorEncoding.Tests {
    2827  /// <summary>
    2928  ///This is a test class for SomePositionsBitflipManipulator and is intended
     
    3231  [TestClass()]
    3332  public class SomePositionsBitflipManipulatorTest {
    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>
    85     [TestMethod()]
     36    [TestMethod]
     37    [TestCategory("Encodings.BinaryVector")]
     38    [TestProperty("Time", "short")]
    8639    public void SomePositionsBitflipManipulatorApplyTest() {
    8740      TestRandom random = new TestRandom();
     
    9750      Assert.IsTrue(Auxiliary.BinaryVectorIsEqualByPosition(expected, parent));
    9851    }
    99 
    100     /// <summary>
    101     ///A test for SomePositionsBitflipManipulator Constructor
    102     ///</summary>
    103     [TestMethod()]
    104     public void SomePositionsBitflipManipulatorConstructorTest() {
    105       SomePositionsBitflipManipulator target = new SomePositionsBitflipManipulator();
    106     }
    10752  }
    10853}
  • 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.