Changeset 9885 for stable/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3/DiscreteCrossoverTest.cs
- Timestamp:
- 08/20/13 17:03:31 (11 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 9764-9775,9777-9778,9782-9786,9792,9803,9806-9807,9810
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Tests
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Tests merged: 9764-9775,9777-9778,9782-9786,9792,9803,9806
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3/DiscreteCrossoverTest.cs
r9456 r9885 21 21 22 22 using HeuristicLab.Core; 23 using HeuristicLab.Encodings.IntegerVectorEncoding;24 23 using HeuristicLab.Tests; 25 24 using Microsoft.VisualStudio.TestTools.UnitTesting; 26 25 27 namespace HeuristicLab.Encodings.IntegerVectorEncoding_33.Tests { 28 29 26 namespace HeuristicLab.Encodings.IntegerVectorEncoding.Tests { 30 27 /// <summary> 31 28 ///This is a test class for DiscreteCrossoverTest and is intended … … 34 31 [TestClass()] 35 32 public class DiscreteCrossoverTest { 36 37 38 private TestContext testContextInstance;39 40 /// <summary>41 ///Gets or sets the test context which provides42 ///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 attributes54 //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 class58 //[ClassInitialize()]59 //public static void MyClassInitialize(TestContext testContext)60 //{61 //}62 //63 //Use ClassCleanup to run code after all tests in a class have run64 //[ClassCleanup()]65 //public static void MyClassCleanup()66 //{67 //}68 //69 //Use TestInitialize to run code before running each test70 //[TestInitialize()]71 //public void MyTestInitialize()72 //{73 //}74 //75 //Use TestCleanup to run code after each test has run76 //[TestCleanup()]77 //public void MyTestCleanup()78 //{79 //}80 //81 #endregion82 83 33 /// <summary> 84 34 ///A test for Cross 85 35 ///</summary> 86 [TestMethod()] 87 [DeploymentItem("HeuristicLab.Encodings.IntegerVectorEncoding-3.3.dll")] 36 [TestMethod] 37 [TestCategory("Encodings.IntegerVector")] 38 [TestProperty("Time", "short")] 88 39 public void DiscreteCrossoverCrossTest() { 89 40 DiscreteCrossover_Accessor target = new DiscreteCrossover_Accessor(new PrivateObject(typeof(DiscreteCrossover))); … … 98 49 IntegerVector actual; 99 50 actual = target.Cross(random, parents); 100 } 101 catch (System.ArgumentException) { 51 } catch (System.ArgumentException) { 102 52 exceptionFired = true; 103 53 } … … 108 58 ///A test for Apply 109 59 ///</summary> 110 [TestMethod()] 60 [TestMethod] 61 [TestCategory("Encodings.IntegerVector")] 62 [TestProperty("Time", "short")] 111 63 public void DiscreteCrossoverApplyTest() { 112 64 TestRandom random = new TestRandom(); … … 130 82 try { 131 83 actual = DiscreteCrossover.Apply(random, new ItemArray<IntegerVector>(new IntegerVector[] { parent1, parent2 })); 132 } 133 catch (System.ArgumentException) { 84 } catch (System.ArgumentException) { 134 85 exceptionFired = true; 135 86 } 136 87 Assert.IsTrue(exceptionFired); 137 88 } 138 139 /// <summary>140 ///A test for DiscreteCrossover Constructor141 ///</summary>142 [TestMethod()]143 public void DiscreteCrossoverConstructorTest() {144 DiscreteCrossover target = new DiscreteCrossover();145 }146 89 } 147 90 }
Note: See TracChangeset
for help on using the changeset viewer.