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.RealVectorEncoding-3.3/BlendAlphaCrossoverTest.cs

    r9768 r9777  
    2222using HeuristicLab.Core;
    2323using HeuristicLab.Data;
    24 using HeuristicLab.Encodings.RealVectorEncoding;
    2524using HeuristicLab.Tests;
    2625using Microsoft.VisualStudio.TestTools.UnitTesting;
    2726
    2827namespace HeuristicLab.Encodings.RealVectorEncoding.Tests {
    29 
    30 
    3128  /// <summary>
    3229  ///This is a test class for BlendAlphaCrossoverTest and is intended
     
    3532  [TestClass()]
    3633  public class BlendAlphaCrossoverTest {
    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.RealVectorEncoding-3.3.dll")]
     37    [TestMethod()]
     38    [TestCategory("Encodings.RealVector")]
     39    [TestProperty("Time", "short")]
    8940    public void BlendAlphaCrossoverCrossTest() {
    9041      BlendAlphaCrossover_Accessor target = new BlendAlphaCrossover_Accessor(new PrivateObject(typeof(BlendAlphaCrossover)));
     
    9950        RealVector actual;
    10051        actual = target.Cross(random, parents);
    101       }
    102       catch (System.ArgumentException) {
     52      } catch (System.ArgumentException) {
    10353        exceptionFired = true;
    10454      }
     
    11161        RealVector 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.RealVector")]
     74    [TestProperty("Time", "short")]
    12475    public void BlendAlphaCrossoverApplyTest() {
    12576      TestRandom random = new TestRandom();
     
    155106      try {
    156107        actual = BlendAlphaCrossover.Apply(random, parent1, parent2, alpha);
    157       }
    158       catch (System.ArgumentException) {
     108      } catch (System.ArgumentException) {
    159109        exceptionFired = true;
    160110      }
     
    170120      try {
    171121        actual = BlendAlphaCrossover.Apply(random, parent1, parent2, alpha);
    172       }
    173       catch (System.ArgumentException) {
     122      } catch (System.ArgumentException) {
    174123        exceptionFired = true;
    175124      }
    176125      Assert.IsTrue(exceptionFired);
    177126    }
    178 
    179     /// <summary>
    180     ///A test for BlendAlphaCrossover Constructor
    181     ///</summary>
    182     [TestMethod]
    183     public void BlendAlphaCrossoverConstructorTest() {
    184       BlendAlphaCrossover target = new BlendAlphaCrossover();
    185     }
    186127  }
    187128}
Note: See TracChangeset for help on using the changeset viewer.