Changeset 11205 for branches/HiveStatistics/sources/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/DirectScheduleGTCrossoverTest.cs
- Timestamp:
- 07/18/14 13:44:53 (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.dll 10 11 HeuristicLab 3.3.5.1.ReSharper.user 11 12 HeuristicLab 3.3.6.0.ReSharper.user 12 13 HeuristicLab.4.5.resharper.user 13 14 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development 14 16 HeuristicLab.resharper.user 15 17 ProtoGen.exe … … 17 19 _ReSharper.HeuristicLab 18 20 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests 19 22 _ReSharper.HeuristicLab.ExtLibs 20 23 bin 21 24 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests23 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
r11203 r11205 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 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; 22 23 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_33.Tests { 30 31 29 namespace HeuristicLab.Encodings.ScheduleEncoding.Tests { 32 30 /// <summary> 33 31 ///This is a test class for DirectScheduleGTCrossoverTest and is intended … … 36 34 [TestClass()] 37 35 public class DirectScheduleGTCrossoverTest { 38 39 40 private TestContext testContextInstance;41 42 /// <summary>43 ///Gets or sets the test context which provides44 ///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 attributes56 //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 class60 //[ClassInitialize()]61 //public static void MyClassInitialize(TestContext testContext)62 //{63 //}64 //65 //Use ClassCleanup to run code after all tests in a class have run66 //[ClassCleanup()]67 //public static void MyClassCleanup()68 //{69 //}70 //71 //Use TestInitialize to run code before running each test72 //[TestInitialize()]73 //public void MyTestInitialize()74 //{75 //}76 //77 //Use TestCleanup to run code after each test has run78 //[TestCleanup()]79 //public void MyTestCleanup()80 //{81 //}82 //83 #endregion84 85 86 36 /// <summary> 87 37 ///A test for Apply 88 38 ///</summary> 89 [TestMethod()] 39 [TestMethod] 40 [TestCategory("Encodings.Schedule")] 41 [TestProperty("Time", "short")] 90 42 public void ApplyTest() { 91 IRandom random = new TestRandom(new int[] { 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 }); 92 44 Schedule parent1 = TestUtils.CreateTestSchedule1(); 93 45 Schedule parent2 = TestUtils.CreateTestSchedule2(); … … 97 49 actual = DirectScheduleGTCrossover.Apply(random, parent1, parent2, jobData, mutProp); 98 50 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()); 99 Assert.IsTrue( actual.Equals(expected));51 Assert.IsTrue(TestUtils.ScheduleEquals(actual, expected)); 100 52 } 53 101 54 } 102 55 }
Note: See TracChangeset
for help on using the changeset viewer.