- Timestamp:
- 10/31/14 10:26:09 (10 years ago)
- Location:
- trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/EsGriewankSampleTest.cs
r11450 r11514 29 29 30 30 namespace HeuristicLab.Tests { 31 /// <summary>32 /// Summary description for EsGriewankSampleTest33 /// </summary>34 31 [TestClass] 35 32 public class EsGriewankSampleTest { 36 private const string samplesDirectory = SamplesUtils.Directory; 37 38 [ClassInitialize] 39 public static void MyClassInitialize(TestContext testContext) { 40 if (!Directory.Exists(samplesDirectory)) 41 Directory.CreateDirectory(samplesDirectory); 42 } 33 private const string SampleFileName = "ES_Griewank"; 43 34 44 35 [TestMethod] … … 47 38 public void CreateEsGriewankSampleTest() { 48 39 var es = CreateEsGriewankSample(); 49 XmlGenerator.Serialize(es, @"Samples\ES_Griewank.hl"); 40 string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension); 41 XmlGenerator.Serialize(es, path); 50 42 } 51 43 -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GATspSampleTest.cs
r11450 r11514 33 33 [TestClass] 34 34 public class GATspSampleTest { 35 private const string samplesDirectory = SamplesUtils.Directory; 36 [ClassInitialize] 37 public static void MyClassInitialize(TestContext testContext) { 38 if (!Directory.Exists(samplesDirectory)) 39 Directory.CreateDirectory(samplesDirectory); 40 } 41 35 private const string SampleFileName = "GA_TSP"; 42 36 43 37 [TestMethod] … … 46 40 public void CreateGaTspSampleTest() { 47 41 var ga = CreateGaTspSample(); 48 XmlGenerator.Serialize(ga, @"Samples\GA_TSP.hl"); 42 string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension); 43 XmlGenerator.Serialize(ga, path); 49 44 } 45 50 46 [TestMethod] 51 47 [TestCategory("Samples.Execute")] … … 63 59 private GeneticAlgorithm CreateGaTspSample() { 64 60 GeneticAlgorithm ga = new GeneticAlgorithm(); 61 65 62 #region Problem Configuration 66 63 var provider = new TSPLIBTSPInstanceProvider(); … … 77 74 ga, 100, 1, 1000, 0.05); 78 75 #endregion 76 79 77 return ga; 80 78 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GAVrpSampleTest.cs
r11450 r11514 34 34 35 35 namespace HeuristicLab.Tests { 36 /// <summary>37 /// Summary description for GAVrpSampleTest38 /// </summary>39 36 [TestClass] 40 37 public class GAVrpSampleTest { 41 private const string samplesDirectory = SamplesUtils.Directory; 42 [ClassInitialize] 43 public static void MyClassInitialize(TestContext testContext) { 44 if (!Directory.Exists(samplesDirectory)) 45 Directory.CreateDirectory(samplesDirectory); 46 } 47 38 private const string SampleFileName = "GA_VRP"; 48 39 49 40 [TestMethod] … … 52 43 public void CreateGaVrpSampleTest() { 53 44 var ga = CreateGaVrpSample(); 54 XmlGenerator.Serialize(ga, @"Samples\GA_VRP.hl"); 45 string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension); 46 XmlGenerator.Serialize(ga, path); 55 47 } 56 48 … … 70 62 private GeneticAlgorithm CreateGaVrpSample() { 71 63 GeneticAlgorithm ga = new GeneticAlgorithm(); 64 72 65 #region Problem Configuration 73 66 VehicleRoutingProblem vrpProblem = new VehicleRoutingProblem(); … … 117 110 .Single(), true); 118 111 #endregion 112 119 113 return ga; 120 114 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPArtificialAntSampleTest.cs
r11450 r11514 30 30 31 31 namespace HeuristicLab.Tests { 32 /// <summary>33 /// Summary description for GPArtificialAntSampleTest34 /// </summary>35 32 [TestClass] 36 33 public class GPArtificialAntSampleTest { 37 private const string samplesDirectory = SamplesUtils.Directory; 38 [ClassInitialize] 39 public static void MyClassInitialize(TestContext testContext) { 40 if (!Directory.Exists(samplesDirectory)) 41 Directory.CreateDirectory(samplesDirectory); 42 } 34 private const string SampleFileName = "SGP_SantaFe"; 43 35 44 36 [TestMethod] … … 47 39 public void CreateGpArtificialAntSampleTest() { 48 40 var ga = CreateGpArtificialAntSample(); 49 XmlGenerator.Serialize(ga, @"Samples\SGP_SantaFe.hl"); 41 string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension); 42 XmlGenerator.Serialize(ga, path); 50 43 } 51 44 … … 65 58 public GeneticAlgorithm CreateGpArtificialAntSample() { 66 59 GeneticAlgorithm ga = new GeneticAlgorithm(); 60 67 61 #region Problem Configuration 68 62 ArtificialAntProblem antProblem = new ArtificialAntProblem(); … … 94 88 .Single(), false); 95 89 #endregion 90 96 91 return ga; 97 92 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPLawnMowerSampleTest.cs
r11450 r11514 20 20 #endregion 21 21 22 using System.IO;23 22 using System.Linq; 24 23 using HeuristicLab.Algorithms.GeneticAlgorithm; … … 28 27 29 28 namespace HeuristicLab.Tests { 30 /// <summary>31 /// Summary description for GPLawnMowerSampleTest32 /// </summary>33 29 [TestClass] 34 30 public class GPLawnMowerSampleTest { 35 private const string samplesDirectory = SamplesUtils.Directory;36 [ClassInitialize]37 public static void MyClassInitialize(TestContext testContext) {38 if (!Directory.Exists(samplesDirectory))39 Directory.CreateDirectory(samplesDirectory);40 }41 42 31 [TestMethod] 43 32 [TestCategory("Samples.Execute")] … … 57 46 58 47 #endregion 59 60 48 #region Algorithm Configuration 61 49 -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPMultiplexerSampleTest.cs
r11051 r11514 33 33 [TestClass] 34 34 public class GPMultiplexerSampleTest { 35 private const string samplesDirectory = SamplesUtils.Directory; 36 [ClassInitialize] 37 public static void MyClassInitialize(TestContext testContext) { 38 if (!Directory.Exists(samplesDirectory)) 39 Directory.CreateDirectory(samplesDirectory); 40 } 35 private const string SampleFileName = "GP_Multiplexer"; 41 36 42 37 [TestMethod] … … 45 40 public void CreateGpMultiplexerSampleTest() { 46 41 var ga = CreateGpMultiplexerSample(); 47 var path = Path.Combine(samplesDirectory, "GP_Multiplexer.hl");42 string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension); 48 43 XmlGenerator.Serialize(ga, path); 49 44 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicClassificationSampleTest.cs
r11450 r11514 33 33 34 34 namespace HeuristicLab.Tests { 35 /// <summary>36 /// Summary description for GPSymbolicClassificationSampleTest37 /// </summary>38 35 [TestClass] 39 36 public class GPSymbolicClassificationSampleTest { 40 private const string samplesDirectory = SamplesUtils.Directory; 41 [ClassInitialize] 42 public static void MyClassInitialize(TestContext testContext) { 43 if (!Directory.Exists(samplesDirectory)) 44 Directory.CreateDirectory(samplesDirectory); 45 } 37 private const string SampleFileName = "SGP_SymbClass"; 46 38 47 39 [TestMethod] … … 50 42 public void CreateGpSymbolicClassificationSampleTest() { 51 43 var ga = CreateGpSymbolicClassificationSample(); 52 XmlGenerator.Serialize(ga, @"Samples\SGP_SymbClass.hl"); 44 string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension); 45 XmlGenerator.Serialize(ga, path); 53 46 } 54 47 -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicRegressionSampleTest.cs
r11450 r11514 33 33 34 34 namespace HeuristicLab.Tests { 35 /// <summary>36 /// Summary description for GPSymbolicRegressionSampleTest37 /// </summary>38 35 [TestClass] 39 36 public class GPSymbolicRegressionSampleTest { 40 private const string samplesDirectory = SamplesUtils.Directory; 41 [ClassInitialize] 42 public static void MyClassInitialize(TestContext testContext) { 43 if (!Directory.Exists(samplesDirectory)) 44 Directory.CreateDirectory(samplesDirectory); 45 } 46 37 private const string SampleFileName = "SGP_SymbReg"; 47 38 48 39 [TestMethod] … … 51 42 public void CreateGpSymbolicRegressionSampleTest() { 52 43 var ga = CreateGpSymbolicRegressionSample(); 53 XmlGenerator.Serialize(ga, @"Samples\SGP_SymbReg.hl"); 44 string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension); 45 XmlGenerator.Serialize(ga, path); 54 46 } 55 47 [TestMethod] -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPTimeSeriesSampleTest.cs
r11091 r11514 32 32 [TestClass] 33 33 public class GPTimeSeriesSampleTest { 34 private const string samplesDirectory = SamplesUtils.Directory; 35 [ClassInitialize] 36 public static void MyClassInitialize(TestContext testContext) { 37 if (!Directory.Exists(samplesDirectory)) 38 Directory.CreateDirectory(samplesDirectory); 39 } 34 private const string SampleFileName = "OSGP_TimeSeries"; 40 35 41 36 [TestMethod] … … 44 39 public void CreateGpTimeSeriesSampleTest() { 45 40 var ga = CreateGpTimeSeriesSample(); 46 var path = Path.Combine(samplesDirectory, "OSGP_TimeSeries.hl");41 string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension); 47 42 XmlGenerator.Serialize(ga, path); 48 43 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GaussianProcessRegressionSampleTest.cs
r11450 r11514 29 29 30 30 namespace HeuristicLab.Tests { 31 /// <summary>32 /// Summary description for GaussianProcessRegressionSampleTest33 /// </summary>34 31 [TestClass] 35 32 public class GaussianProcessRegressionSampleTest { 36 private const string samplesDirectory = SamplesUtils.Directory; 37 [ClassInitialize] 38 public static void MyClassInitialize(TestContext testContext) { 39 if (!Directory.Exists(samplesDirectory)) 40 Directory.CreateDirectory(samplesDirectory); 41 } 33 private const string SampleFileName = "GPR"; 42 34 43 35 [TestMethod] … … 46 38 public void CreateGaussianProcessRegressionSampleTest() { 47 39 var gpr = CreateGaussianProcessRegressionSample(); 48 XmlGenerator.Serialize(gpr, @"Samples\GPR.hl"); 40 string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension); 41 XmlGenerator.Serialize(gpr, path); 49 42 } 43 50 44 [TestMethod] 51 45 [TestCategory("Samples.Execute")] … … 66 60 var regProblem = new RegressionProblem(); 67 61 regProblem.Load(provider.LoadData(instance)); 62 68 63 #region Algorithm Configuration 69 64 gpr.Name = "Gaussian Process Regression"; … … 77 72 gpr.SetSeedRandomly = true; 78 73 #endregion 74 79 75 gpr.Engine = new ParallelEngine.ParallelEngine(); 80 76 return gpr; -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GeSymbolicRegressionSampleTest.cs
r11450 r11514 30 30 31 31 namespace HeuristicLab.Tests { 32 /// <summary>33 /// Summary description for GeSymbolicRegressionSampleTest34 /// </summary>35 32 [TestClass] 36 33 public class GeSymbolicRegressionSampleTest { 37 private const string samplesDirectory = SamplesUtils.Directory; 38 [ClassInitialize] 39 public static void MyClassInitialize(TestContext testContext) { 40 if (!Directory.Exists(samplesDirectory)) 41 Directory.CreateDirectory(samplesDirectory); 42 } 34 #region artificial ant 35 private const string GeArtificialAntSampleFileName = "GE_ArtificialAnt"; 43 36 44 #region artificial ant45 37 [TestMethod] 46 38 [TestCategory("Samples.Create")] … … 48 40 public void CreateGeArtificialAntSampleTest() { 49 41 var geaa = CreateGeArtificialAntSample(); 50 XmlGenerator.Serialize(geaa, @"Samples\GE_ArtificialAnt.hl"); 42 string path = Path.Combine(SamplesUtils.SamplesDirectory, GeArtificialAntSampleFileName + SamplesUtils.SampleFileExtension); 43 XmlGenerator.Serialize(geaa, path); 51 44 } 52 45 … … 62 55 public OffspringSelectionGeneticAlgorithm CreateGeArtificialAntSample() { 63 56 OffspringSelectionGeneticAlgorithm ga = new OffspringSelectionGeneticAlgorithm(); 57 64 58 #region Problem Configuration 65 59 var problem = new HeuristicLab.Problems.GrammaticalEvolution.GEArtificialAntProblem(); … … 72 66 ga, 200, 1, 50, 0.05, 200); 73 67 #endregion 68 74 69 return ga; 75 70 } … … 77 72 78 73 #region symbolic regression 79 #endregion 74 private const string GeSymbolicRegressionSampleFileName = "GE_SymbReg"; 75 80 76 [TestMethod] 81 77 [TestCategory("Samples.Create")] … … 83 79 public void CreateGeSymbolicRegressionSampleTest() { 84 80 var geSymbReg = CreateGeSymbolicRegressionSample(); 85 XmlGenerator.Serialize(geSymbReg, @"Samples\GE_SymbReg.hl"); 81 string path = Path.Combine(SamplesUtils.SamplesDirectory, GeSymbolicRegressionSampleFileName + SamplesUtils.SampleFileExtension); 82 XmlGenerator.Serialize(geSymbReg, path); 86 83 } 87 84 … … 97 94 public OffspringSelectionGeneticAlgorithm CreateGeSymbolicRegressionSample() { 98 95 var ga = new OffspringSelectionGeneticAlgorithm(); 96 99 97 #region Problem Configuration 100 98 var problem = new HeuristicLab.Problems.GrammaticalEvolution.GESymbolicRegressionSingleObjectiveProblem(); … … 116 114 ga, 1000, 1, 50, 0.05, 200); 117 115 #endregion 116 118 117 return ga; 119 118 } 119 #endregion 120 120 } 121 121 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/IslandGaTspSampleTest.cs
r11450 r11514 34 34 [TestClass] 35 35 public class UnitTest1 { 36 private const string samplesDirectory = SamplesUtils.Directory; 37 [ClassInitialize] 38 public static void MyClassInitialize(TestContext testContext) { 39 if (!Directory.Exists(samplesDirectory)) 40 Directory.CreateDirectory(samplesDirectory); 41 } 36 private const string SampleFileName = "IslandGA_TSP"; 42 37 43 38 [TestMethod] … … 46 41 public void CreateIslandGaTspSampleTest() { 47 42 var ga = CreateIslandGaTspSample(); 48 XmlGenerator.Serialize(ga, @"Samples\IslandGA_TSP.hl"); 43 string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension); 44 XmlGenerator.Serialize(ga, path); 49 45 } 50 46 [TestMethod] -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/LocalSearchKnapsackSampleTest.cs
r11450 r11514 30 30 31 31 namespace HeuristicLab.Tests { 32 /// <summary>33 /// Summary description for LocalSearchKnapsackSampleTest34 /// </summary>35 32 [TestClass] 36 33 public class LocalSearchKnapsackSampleTest { 37 private const string samplesDirectory = SamplesUtils.Directory; 38 [ClassInitialize] 39 public static void MyClassInitialize(TestContext testContext) { 40 if (!Directory.Exists(samplesDirectory)) 41 Directory.CreateDirectory(samplesDirectory); 42 } 34 private const string SampleFileName = "LS_Knapsack"; 43 35 44 36 [TestMethod] … … 47 39 public void CreateLocalSearchKnapsackSampleTest() { 48 40 var ls = CreateLocalSearchKnapsackSample(); 49 XmlGenerator.Serialize(ls, @"Samples\LS_Knapsack.hl"); 41 string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension); 42 XmlGenerator.Serialize(ls, path); 50 43 } 51 44 [TestMethod] -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/PsoSchwefelSampleTest.cs
r11450 r11514 32 32 33 33 namespace HeuristicLab.Tests { 34 /// <summary>35 /// Summary description for PsoSchwefelSampleTest36 /// </summary>37 34 [TestClass] 38 35 public class PsoSchwefelSampleTest { 39 private const string samplesDirectory = SamplesUtils.Directory; 40 [ClassInitialize] 41 public static void MyClassInitialize(TestContext testContext) { 42 if (!Directory.Exists(samplesDirectory)) 43 Directory.CreateDirectory(samplesDirectory); 44 } 36 private const string SampleFileName = "PSO_Schwefel"; 45 37 46 38 [TestMethod] … … 49 41 public void CreatePsoSchwefelSampleTest() { 50 42 var pso = CreatePsoSchwefelSample(); 51 XmlGenerator.Serialize(pso, @"Samples\PSO_Schwefel.hl"); 43 string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension); 44 XmlGenerator.Serialize(pso, path); 52 45 } 53 46 [TestMethod] -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/RAPGASchedulingSampleTest.cs
r11450 r11514 29 29 30 30 namespace HeuristicLab.Tests { 31 /// <summary>32 /// Summary description for RAPGASchedulingSampleTest33 /// </summary>34 31 [TestClass] 35 32 public class RAPGASchedulingSampleTest { 36 private const string samplesDirectory = SamplesUtils.Directory; 37 [ClassInitialize] 38 public static void MyClassInitialize(TestContext testContext) { 39 if (!Directory.Exists(samplesDirectory)) 40 Directory.CreateDirectory(samplesDirectory); 41 } 33 private const string SampleFileName = "RAPGA_JSSP"; 42 34 43 35 [TestMethod] … … 46 38 public void CreateRAPGASchedulingSampleTest() { 47 39 var ss = CreateRAPGASchedulingSample(); 48 XmlGenerator.Serialize(ss, @"Samples\RAPGA_JSSP.hl"); 40 string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension); 41 XmlGenerator.Serialize(ss, path); 49 42 } 50 43 -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/SamplesUtils.cs
r11051 r11514 12 12 namespace HeuristicLab.Tests { 13 13 public static class SamplesUtils { 14 public const string Directory = @"Samples\"; 14 public const string SamplesDirectory = @"Samples\"; 15 public const string SampleFileExtension = ".hl"; 15 16 16 17 public static void RunAlgorithm(IAlgorithm a) { -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/ScatterSearchVRPSampleTest.cs
r11450 r11514 29 29 30 30 namespace HeuristicLab.Tests { 31 /// <summary>32 /// Summary description for ScatterSearchVRPSampleTest33 /// </summary>34 31 [TestClass] 35 32 public class ScatterSearchVRPSampleTest { 36 private const string samplesDirectory = SamplesUtils.Directory; 37 [ClassInitialize] 38 public static void MyClassInitialize(TestContext testContext) { 39 if (!Directory.Exists(samplesDirectory)) 40 Directory.CreateDirectory(samplesDirectory); 41 } 33 private const string SampleFileName = "SS_VRP"; 42 34 43 35 [TestMethod] … … 46 38 public void CreateScatterSearchVRPSampleTest() { 47 39 var ss = CreateScatterSearchVRPSample(); 48 XmlGenerator.Serialize(ss, @"Samples\SS_VRP.hl"); 40 string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension); 41 XmlGenerator.Serialize(ss, path); 49 42 } 50 43 -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/SimulatedAnnealingRastriginSampleTest.cs
r11450 r11514 31 31 32 32 namespace HeuristicLab.Tests { 33 /// <summary>34 /// Summary description for SimulatedAnnealingRastriginSampleTest35 /// </summary>36 33 [TestClass] 37 34 public class SimulatedAnnealingRastriginSampleTest { 38 private const string samplesDirectory = SamplesUtils.Directory; 39 [ClassInitialize] 40 public static void MyClassInitialize(TestContext testContext) { 41 if (!Directory.Exists(samplesDirectory)) 42 Directory.CreateDirectory(samplesDirectory); 43 } 35 private const string SampleFileName = "SA_Rastrigin"; 44 36 45 37 [TestMethod] … … 48 40 public void CreateSimulatedAnnealingRastriginSampleTest() { 49 41 var sa = CreateSimulatedAnnealingRastriginSample(); 50 XmlGenerator.Serialize(sa, @"Samples\SA_Rastrigin.hl"); 42 string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension); 43 XmlGenerator.Serialize(sa, path); 51 44 } 52 45 [TestMethod] -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/TabuSearchTspSampleTest.cs
r11450 r11514 30 30 31 31 namespace HeuristicLab.Tests { 32 /// <summary>33 /// Summary description for TabuSearchTspSampleTest34 /// </summary>35 32 [TestClass] 36 33 public class TabuSearchTspSampleTest { 37 private const string samplesDirectory = SamplesUtils.Directory; 38 [ClassInitialize] 39 public static void MyClassInitialize(TestContext testContext) { 40 if (!Directory.Exists(samplesDirectory)) 41 Directory.CreateDirectory(samplesDirectory); 42 } 43 34 private const string SampleFileName = "TS_TSP"; 44 35 45 36 [TestMethod] … … 48 39 public void CreateTabuSearchTspSampleTest() { 49 40 var ts = CreateTabuSearchTspSample(); 50 XmlGenerator.Serialize(ts, @"Samples\TS_TSP.hl"); 41 string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension); 42 XmlGenerator.Serialize(ts, path); 51 43 } 52 44 [TestMethod] -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/TabuSearchVRPSampleTest.cs
r11450 r11514 30 30 31 31 namespace HeuristicLab.Tests { 32 /// <summary>33 /// Summary description for TabuSearchVRPSampleTest34 /// </summary>35 32 [TestClass] 36 33 public class TabuSearchVRPSampleTest { 37 private const string samplesDirectory = SamplesUtils.Directory; 38 [ClassInitialize] 39 public static void MyClassInitialize(TestContext testContext) { 40 if (!Directory.Exists(samplesDirectory)) 41 Directory.CreateDirectory(samplesDirectory); 42 } 34 private const string SampleFileName = "TS_VRP"; 43 35 44 36 [TestMethod] … … 47 39 public void CreateTabuSearchVRPSampleTest() { 48 40 var vrp = CreateTabuSearchVrpSample(); 49 XmlGenerator.Serialize(vrp, @"Samples\TS_VRP.hl"); 41 string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension); 42 XmlGenerator.Serialize(vrp, path); 50 43 } 51 44 [TestMethod] -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/VnsTspSampleTest.cs
r11450 r11514 31 31 32 32 namespace HeuristicLab.Tests { 33 /// <summary>34 /// Summary description for VnsTspSampleTest35 /// </summary>36 33 [TestClass] 37 34 public class VnsTspSampleTest { 38 private const string samplesDirectory = SamplesUtils.Directory; 39 [ClassInitialize] 40 public static void MyClassInitialize(TestContext testContext) { 41 if (!Directory.Exists(samplesDirectory)) 42 Directory.CreateDirectory(samplesDirectory); 43 } 35 private const string SampleFileName = "VNS_TSP"; 44 36 45 37 [TestMethod] … … 48 40 public void CreateVnsTspSampleTest() { 49 41 var vns = CreateVnsTspSample(); 50 XmlGenerator.Serialize(vns, @"Samples\VNS_TSP.hl"); 42 string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension); 43 XmlGenerator.Serialize(vns, path); 51 44 } 52 45 [TestMethod]
Note: See TracChangeset
for help on using the changeset viewer.