Changeset 11203 for branches/HiveStatistics/sources/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/DirectScheduleGTCrossoverTest.cs
- Timestamp:
- 07/18/14 12:35:00 (10 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources
- Property svn:ignore
-
old new 8 8 FxCopResults.txt 9 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll11 10 HeuristicLab 3.3.5.1.ReSharper.user 12 11 HeuristicLab 3.3.6.0.ReSharper.user 13 12 HeuristicLab.4.5.resharper.user 14 13 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development16 14 HeuristicLab.resharper.user 17 15 ProtoGen.exe … … 19 17 _ReSharper.HeuristicLab 20 18 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests22 19 _ReSharper.HeuristicLab.ExtLibs 23 20 bin 24 21 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/HiveStatistics/sources/HeuristicLab.Tests
- Property svn:mergeinfo changed
-
branches/HiveStatistics/sources/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/DirectScheduleGTCrossoverTest.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System.Linq;23 22 using HeuristicLab.Core; 23 using HeuristicLab.Encodings.ScheduleEncoding; 24 24 using HeuristicLab.Encodings.ScheduleEncoding.PermutationWithRepetition; 25 25 using HeuristicLab.Encodings.ScheduleEncoding.ScheduleEncoding; … … 27 27 using Microsoft.VisualStudio.TestTools.UnitTesting; 28 28 29 namespace HeuristicLab.Encodings.ScheduleEncoding.Tests { 29 namespace HeuristicLab.Encodings.ScheduleEncoding_33.Tests { 30 31 30 32 /// <summary> 31 33 ///This is a test class for DirectScheduleGTCrossoverTest and is intended … … 34 36 [TestClass()] 35 37 public class DirectScheduleGTCrossoverTest { 38 39 40 private TestContext testContextInstance; 41 42 /// <summary> 43 ///Gets or sets the test context which provides 44 ///information about and functionality for the current test run. 45 ///</summary> 46 public TestContext TestContext { 47 get { 48 return testContextInstance; 49 } 50 set { 51 testContextInstance = value; 52 } 53 } 54 55 #region Additional test attributes 56 // 57 //You can use the following additional attributes as you write your tests: 58 // 59 //Use ClassInitialize to run code before running the first test in the class 60 //[ClassInitialize()] 61 //public static void MyClassInitialize(TestContext testContext) 62 //{ 63 //} 64 // 65 //Use ClassCleanup to run code after all tests in a class have run 66 //[ClassCleanup()] 67 //public static void MyClassCleanup() 68 //{ 69 //} 70 // 71 //Use TestInitialize to run code before running each test 72 //[TestInitialize()] 73 //public void MyTestInitialize() 74 //{ 75 //} 76 // 77 //Use TestCleanup to run code after each test has run 78 //[TestCleanup()] 79 //public void MyTestCleanup() 80 //{ 81 //} 82 // 83 #endregion 84 85 36 86 /// <summary> 37 87 ///A test for Apply 38 88 ///</summary> 39 [TestMethod] 40 [TestCategory("Encodings.Schedule")] 41 [TestProperty("Time", "short")] 89 [TestMethod()] 42 90 public void ApplyTest() { 43 IRandom random = new TestRandom(new int[] { 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1 }, new double[] { 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9 });91 IRandom random = new TestRandom(new int[] { 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1 }, new double[] { 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9 }); 44 92 Schedule parent1 = TestUtils.CreateTestSchedule1(); 45 93 Schedule parent2 = TestUtils.CreateTestSchedule2(); … … 49 97 actual = DirectScheduleGTCrossover.Apply(random, parent1, parent2, jobData, mutProp); 50 98 Schedule expected = DirectScheduleRandomCreator.Apply(3, 3, new PWREncoding(3, 3, new TestRandom(new int[] { 0, 2, 1, 1, 0, 2, 1, 2, 0 }, null)), TestUtils.CreateJobData()); 51 Assert.IsTrue( TestUtils.ScheduleEquals(actual,expected));99 Assert.IsTrue(actual.Equals(expected)); 52 100 } 53 54 101 } 55 102 }
Note: See TracChangeset
for help on using the changeset viewer.