Changeset 9777 for trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/SinglePointCrossoverTest.cs
- Timestamp:
- 07/26/13 13:25:19 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/SinglePointCrossoverTest.cs
r9768 r9777 21 21 22 22 using HeuristicLab.Core; 23 using HeuristicLab.Encodings.RealVectorEncoding;24 23 using HeuristicLab.Tests; 25 24 using Microsoft.VisualStudio.TestTools.UnitTesting; 26 25 27 26 namespace HeuristicLab.Encodings.RealVectorEncoding.Tests { 28 29 30 27 /// <summary> 31 28 ///This is a test class for SinglePointCrossoverTest and is intended … … 34 31 [TestClass()] 35 32 public class SinglePointCrossoverTest { 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.RealVectorEncoding-3.3.dll")] 36 [TestMethod()] 37 [TestCategory("Encodings.RealVector")] 38 [TestProperty("Time", "short")] 88 39 public void SinglePointCrossoverCrossTest() { 89 40 SinglePointCrossover_Accessor target = new SinglePointCrossover_Accessor(new PrivateObject(typeof(SinglePointCrossover))); … … 98 49 RealVector actual; 99 50 actual = target.Cross(random, parents); 100 } 101 catch (System.ArgumentException) { 51 } catch (System.ArgumentException) { 102 52 exceptionFired = true; 103 53 } … … 110 60 RealVector actual; 111 61 actual = target.Cross(random, parents); 112 } 113 catch (System.ArgumentException) { 62 } catch (System.ArgumentException) { 114 63 exceptionFired = true; 115 64 } … … 122 71 RealVector actual; 123 72 actual = target.Cross(random, parents); 124 } 125 catch (System.ArgumentException) { 73 } catch (System.ArgumentException) { 126 74 exceptionFired = true; 127 75 } … … 132 80 ///A test for Apply 133 81 ///</summary> 134 [TestMethod] 82 [TestMethod()] 83 [TestCategory("Encodings.RealVector")] 84 [TestProperty("Time", "short")] 135 85 public void SinglePointCrossoverApplyTest() { 136 86 TestRandom random = new TestRandom(); … … 153 103 try { 154 104 actual = SinglePointCrossover.Apply(random, parent1, parent2); 155 } 156 catch (System.ArgumentException) { 105 } catch (System.ArgumentException) { 157 106 exceptionFired = true; 158 107 } … … 168 117 // The following test is not based on published examples 169 118 } 170 171 /// <summary>172 ///A test for SinglePointCrossover Constructor173 ///</summary>174 [TestMethod]175 public void SinglePointCrossoverConstructorTest() {176 SinglePointCrossover target = new SinglePointCrossover();177 }178 119 } 179 120 }
Note: See TracChangeset
for help on using the changeset viewer.