Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/27/14 11:23:37 (10 years ago)
Author:
jkarder
Message:

#2116: merged r10041-r11593 from trunk into branch

Location:
branches/Breadcrumbs
Files:
2 deleted
19 edited
19 copied

Legend:

Unmodified
Added
Removed
  • branches/Breadcrumbs

  • branches/Breadcrumbs/HeuristicLab.Tests

  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/AlgorithmExtensions.cs

    r9764 r11594  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/CloningConstructorTest.cs

    r9783 r11594  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2121
    2222using System;
    23 using System.Linq;
    2423using System.Reflection;
    2524using System.Text;
     
    3130  [TestClass]
    3231  public class CloningConstructorTest {
    33     // Use ClassInitialize to run code before running the first test in the class
    34     [ClassInitialize]
    35     public static void MyClassInitialize(TestContext testContext) {
    36       PluginLoader.Assemblies.Any();
    37     }
    38 
    3932    [TestMethod]
    4033    [TestCategory("General")]
     
    4740        //test only types contained in HL plugin assemblies
    4841        if (!PluginLoader.Assemblies.Contains(deepCloneableType.Assembly)) continue;
     42        if (deepCloneableType.IsSealed) continue;
    4943
    5044        bool found = false;
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/CollectObjectGraphTest.cs

    r9955 r11594  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/ContentViewTests.cs

    r9783 r11594  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3131  [TestClass]
    3232  public class ContentViewTests {
    33     public ContentViewTests() {
    34     }
    35 
    36     // Use ClassInitialize to run code before running the first test in the class
    37     [ClassInitialize]
    38     public static void MyClassInitialize(TestContext testContext) {
    39       PluginLoader.Assemblies.Any();
    40     }
    41 
    42 
    4333    [TestMethod]
    4434    [TestCategory("General")]
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/DeepCloneableCloningTest.cs

    r9955 r11594  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2525using HeuristicLab.Common;
    2626using HeuristicLab.Core;
     27using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2728using HeuristicLab.Optimization;
    2829using HeuristicLab.Persistence.Default.Xml;
     
    3132
    3233namespace HeuristicLab.Tests {
    33   /// <summary>
    34   /// Summary description for DeepCloneableCloningTest
    35   /// </summary>
    3634  [TestClass]
    3735  public class DeepCloneableCloningTest {
    38 
    39     [ClassInitialize]
    40     public static void MyClassInitialize(TestContext testContext) {
    41       PluginLoader.Assemblies.Any();
    42     }
    43 
    4436    private TestContext testContextInstance;
    4537    public TestContext TestContext {
     
    5446      excludedTypes.Add(typeof(HeuristicLab.Problems.DataAnalysis.ClassificationEnsembleSolution));
    5547      excludedTypes.Add(typeof(HeuristicLab.Problems.DataAnalysis.RegressionEnsembleSolution));
     48      excludedTypes.Add(typeof(SymbolicExpressionGrammar).Assembly.GetType("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.EmptySymbolicExpressionTreeGrammar"));
    5649
    5750      foreach (var symbolType in ApplicationManager.Manager.GetTypes(typeof(HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbol)))
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/GeneticAlgorithmTest.cs

    r9955 r11594  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/InstantiateCreatablesTest.cs

    r9783 r11594  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3131  [TestClass]
    3232  public class InstantiateCreatablesTest {
    33     // Use ClassInitialize to run code before running the first test in the class
    34     [ClassInitialize]
    35     public static void MyClassInitialize(TestContext testContext) {
    36       PluginLoader.Assemblies.Any();
    37     }
    3833    [TestMethod]
    3934    [TestCategory("General")]
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/NamedItemTest.cs

    r9820 r11594  
    1 using System.Linq;
    2 using System.Text;
     1using System.Text;
    32using HeuristicLab.Common;
    43using HeuristicLab.Core;
     
    98  [TestClass]
    109  public class NamedItemTest {
    11     [ClassInitialize]
    12     public static void MyClassInitialize(TestContext testContext) {
    13       PluginLoader.Assemblies.Any();
    14     }
    15 
    1610    [TestMethod]
    1711    [TestCategory("General")]
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/ParameterVisibilityTest.cs

    r9783 r11594  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3131  [TestClass]
    3232  public class ParameterVisibilityTest {
    33     // Use ClassInitialize to run code before running the first test in the class
    34     [ClassInitialize]
    35     public static void MyClassInitialize(TestContext testContext) {
    36       PluginLoader.Assemblies.Any();
    37     }
    38 
    3933    private TestContext testContextInstance;
    4034    public TestContext TestContext {
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/PluginDependenciesTest.cs

    r9783 r11594  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    9292
    9393          if (pluginDependencyName == "HeuristicLab.MathJax") continue; //is never referenced as this plugin contains HTML files
     94          if (pluginDependencyName == "HeuristicLab.MatlabConnector") continue; //the matlab connector is loaded dynamically and hence not referenced by the dll
    9495          var referencedPluginAssemblies = pluginAssembly.GetReferencedAssemblies().Where(IsPluginAssemblyName);
    9596          if (referencedPluginAssemblies.Any(a => pluginNames[a.FullName] == pluginDependencyName)) continue;
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/PluginLoader.cs

    r9792 r11594  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/Samples/EsGriewankSampleTest.cs

    r11500 r11594  
    2929
    3030namespace HeuristicLab.Tests {
    31   /// <summary>
    32   /// Summary description for EsGriewankSampleTest
    33   /// </summary>
    3431  [TestClass]
    3532  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";
    4334
    4435    [TestMethod]
     
    4738    public void CreateEsGriewankSampleTest() {
    4839      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);
    5042    }
    5143
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GATspSampleTest.cs

    r11500 r11594  
    3333  [TestClass]
    3434  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";
    4236
    4337    [TestMethod]
     
    4640    public void CreateGaTspSampleTest() {
    4741      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);
    4944    }
     45
    5046    [TestMethod]
    5147    [TestCategory("Samples.Execute")]
     
    6359    private GeneticAlgorithm CreateGaTspSample() {
    6460      GeneticAlgorithm ga = new GeneticAlgorithm();
     61
    6562      #region Problem Configuration
    6663      var provider = new TSPLIBTSPInstanceProvider();
     
    7774        ga, 100, 1, 1000, 0.05);
    7875      #endregion
     76
    7977      return ga;
    8078    }
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GAVrpSampleTest.cs

    r11500 r11594  
    3434
    3535namespace HeuristicLab.Tests {
    36   /// <summary>
    37   /// Summary description for GAVrpSampleTest
    38   /// </summary>
    3936  [TestClass]
    4037  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";
    4839
    4940    [TestMethod]
     
    5243    public void CreateGaVrpSampleTest() {
    5344      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);
    5547    }
    5648
     
    7062    private GeneticAlgorithm CreateGaVrpSample() {
    7163      GeneticAlgorithm ga = new GeneticAlgorithm();
     64
    7265      #region Problem Configuration
    7366      VehicleRoutingProblem vrpProblem = new VehicleRoutingProblem();
     
    117110        .Single(), true);
    118111      #endregion
     112
    119113      return ga;
    120114    }
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPArtificialAntSampleTest.cs

    r11500 r11594  
    3030
    3131namespace HeuristicLab.Tests {
    32   /// <summary>
    33   /// Summary description for GPArtificialAntSampleTest
    34   /// </summary>
    3532  [TestClass]
    3633  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";
    4335
    4436    [TestMethod]
     
    4739    public void CreateGpArtificialAntSampleTest() {
    4840      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);
    5043    }
    5144
     
    6558    public GeneticAlgorithm CreateGpArtificialAntSample() {
    6659      GeneticAlgorithm ga = new GeneticAlgorithm();
     60
    6761      #region Problem Configuration
    6862      ArtificialAntProblem antProblem = new ArtificialAntProblem();
     
    9488        .Single(), false);
    9589      #endregion
     90
    9691      return ga;
    9792    }
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPLawnMowerSampleTest.cs

    r11500 r11594  
    2020#endregion
    2121
    22 using System.IO;
    2322using System.Linq;
    2423using HeuristicLab.Algorithms.GeneticAlgorithm;
     
    2827
    2928namespace HeuristicLab.Tests {
    30   /// <summary>
    31   /// Summary description for GPLawnMowerSampleTest
    32   /// </summary>
    3329  [TestClass]
    3430  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 
    4231    [TestMethod]
    4332    [TestCategory("Samples.Execute")]
     
    5746
    5847      #endregion
    59 
    6048      #region Algorithm Configuration
    6149
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPMultiplexerSampleTest.cs

    r11051 r11594  
    3333  [TestClass]
    3434  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";
    4136
    4237    [TestMethod]
     
    4540    public void CreateGpMultiplexerSampleTest() {
    4641      var ga = CreateGpMultiplexerSample();
    47       var path = Path.Combine(samplesDirectory, "GP_Multiplexer.hl");
     42      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
    4843      XmlGenerator.Serialize(ga, path);
    4944    }
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicClassificationSampleTest.cs

    r11500 r11594  
    3333
    3434namespace HeuristicLab.Tests {
    35   /// <summary>
    36   /// Summary description for GPSymbolicClassificationSampleTest
    37   /// </summary>
    3835  [TestClass]
    3936  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";
    4638
    4739    [TestMethod]
     
    5042    public void CreateGpSymbolicClassificationSampleTest() {
    5143      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);
    5346    }
    5447
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicRegressionSampleTest.cs

    r11500 r11594  
    3333
    3434namespace HeuristicLab.Tests {
    35   /// <summary>
    36   /// Summary description for GPSymbolicRegressionSampleTest
    37   /// </summary>
    3835  [TestClass]
    3936  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";
    4738
    4839    [TestMethod]
     
    5142    public void CreateGpSymbolicRegressionSampleTest() {
    5243      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);
    5446    }
    5547    [TestMethod]
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPTimeSeriesSampleTest.cs

    r11091 r11594  
    3232  [TestClass]
    3333  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";
    4035
    4136    [TestMethod]
     
    4439    public void CreateGpTimeSeriesSampleTest() {
    4540      var ga = CreateGpTimeSeriesSample();
    46       var path = Path.Combine(samplesDirectory, "OSGP_TimeSeries.hl");
     41      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
    4742      XmlGenerator.Serialize(ga, path);
    4843    }
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GaussianProcessRegressionSampleTest.cs

    r11500 r11594  
    2929
    3030namespace HeuristicLab.Tests {
    31   /// <summary>
    32   /// Summary description for GaussianProcessRegressionSampleTest
    33   /// </summary>
    3431  [TestClass]
    3532  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";
    4234
    4335    [TestMethod]
     
    4638    public void CreateGaussianProcessRegressionSampleTest() {
    4739      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);
    4942    }
     43
    5044    [TestMethod]
    5145    [TestCategory("Samples.Execute")]
     
    6660      var regProblem = new RegressionProblem();
    6761      regProblem.Load(provider.LoadData(instance));
     62
    6863      #region Algorithm Configuration
    6964      gpr.Name = "Gaussian Process Regression";
     
    7772      gpr.SetSeedRandomly = true;
    7873      #endregion
     74
    7975      gpr.Engine = new ParallelEngine.ParallelEngine();
    8076      return gpr;
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GeSymbolicRegressionSampleTest.cs

    r11500 r11594  
    3030
    3131namespace HeuristicLab.Tests {
    32   /// <summary>
    33   /// Summary description for GeSymbolicRegressionSampleTest
    34   /// </summary>
    3532  [TestClass]
    3633  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";
    4336
    44     #region artificial ant
    4537    [TestMethod]
    4638    [TestCategory("Samples.Create")]
     
    4840    public void CreateGeArtificialAntSampleTest() {
    4941      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);
    5144    }
    5245
     
    6255    public OffspringSelectionGeneticAlgorithm CreateGeArtificialAntSample() {
    6356      OffspringSelectionGeneticAlgorithm ga = new OffspringSelectionGeneticAlgorithm();
     57
    6458      #region Problem Configuration
    6559      var problem = new HeuristicLab.Problems.GrammaticalEvolution.GEArtificialAntProblem();
     
    7266        ga, 200, 1, 50, 0.05, 200);
    7367      #endregion
     68
    7469      return ga;
    7570    }
     
    7772
    7873    #region symbolic regression
    79     #endregion
     74    private const string GeSymbolicRegressionSampleFileName = "GE_SymbReg";
     75
    8076    [TestMethod]
    8177    [TestCategory("Samples.Create")]
     
    8379    public void CreateGeSymbolicRegressionSampleTest() {
    8480      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);
    8683    }
    8784
     
    9794    public OffspringSelectionGeneticAlgorithm CreateGeSymbolicRegressionSample() {
    9895      var ga = new OffspringSelectionGeneticAlgorithm();
     96
    9997      #region Problem Configuration
    10098      var problem = new HeuristicLab.Problems.GrammaticalEvolution.GESymbolicRegressionSingleObjectiveProblem();
     
    116114        ga, 1000, 1, 50, 0.05, 200);
    117115      #endregion
     116
    118117      return ga;
    119118    }
     119    #endregion
    120120  }
    121121}
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/Samples/IslandGaTspSampleTest.cs

    r11500 r11594  
    3434  [TestClass]
    3535  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";
    4237
    4338    [TestMethod]
     
    4641    public void CreateIslandGaTspSampleTest() {
    4742      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);
    4945    }
    5046    [TestMethod]
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/Samples/LocalSearchKnapsackSampleTest.cs

    r11500 r11594  
    3030
    3131namespace HeuristicLab.Tests {
    32   /// <summary>
    33   /// Summary description for LocalSearchKnapsackSampleTest
    34   /// </summary>
    3532  [TestClass]
    3633  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";
    4335
    4436    [TestMethod]
     
    4739    public void CreateLocalSearchKnapsackSampleTest() {
    4840      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);
    5043    }
    5144    [TestMethod]
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/Samples/PsoSchwefelSampleTest.cs

    r11500 r11594  
    3232
    3333namespace HeuristicLab.Tests {
    34   /// <summary>
    35   /// Summary description for PsoSchwefelSampleTest
    36   /// </summary>
    3734  [TestClass]
    3835  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";
    4537
    4638    [TestMethod]
     
    4941    public void CreatePsoSchwefelSampleTest() {
    5042      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);
    5245    }
    5346    [TestMethod]
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/Samples/RAPGASchedulingSampleTest.cs

    r11500 r11594  
    2929
    3030namespace HeuristicLab.Tests {
    31   /// <summary>
    32   /// Summary description for RAPGASchedulingSampleTest
    33   /// </summary>
    3431  [TestClass]
    3532  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";
    4234
    4335    [TestMethod]
     
    4638    public void CreateRAPGASchedulingSampleTest() {
    4739      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);
    4942    }
    5043
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/Samples/SamplesUtils.cs

    r11051 r11594  
    1212namespace HeuristicLab.Tests {
    1313  public static class SamplesUtils {
    14     public const string Directory = @"Samples\";
     14    public const string SamplesDirectory = @"Samples\";
     15    public const string SampleFileExtension = ".hl";
    1516
    1617    public static void RunAlgorithm(IAlgorithm a) {
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/Samples/ScatterSearchVRPSampleTest.cs

    r11500 r11594  
    2929
    3030namespace HeuristicLab.Tests {
    31   /// <summary>
    32   /// Summary description for ScatterSearchVRPSampleTest
    33   /// </summary>
    3431  [TestClass]
    3532  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";
    4234
    4335    [TestMethod]
     
    4638    public void CreateScatterSearchVRPSampleTest() {
    4739      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);
    4942    }
    5043
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/Samples/SimulatedAnnealingRastriginSampleTest.cs

    r11500 r11594  
    3131
    3232namespace HeuristicLab.Tests {
    33   /// <summary>
    34   /// Summary description for SimulatedAnnealingRastriginSampleTest
    35   /// </summary>
    3633  [TestClass]
    3734  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";
    4436
    4537    [TestMethod]
     
    4840    public void CreateSimulatedAnnealingRastriginSampleTest() {
    4941      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);
    5144    }
    5245    [TestMethod]
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/Samples/TabuSearchTspSampleTest.cs

    r11500 r11594  
    3030
    3131namespace HeuristicLab.Tests {
    32   /// <summary>
    33   /// Summary description for TabuSearchTspSampleTest
    34   /// </summary>
    3532  [TestClass]
    3633  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";
    4435
    4536    [TestMethod]
     
    4839    public void CreateTabuSearchTspSampleTest() {
    4940      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);
    5143    }
    5244    [TestMethod]
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/Samples/TabuSearchVRPSampleTest.cs

    r11500 r11594  
    3030
    3131namespace HeuristicLab.Tests {
    32   /// <summary>
    33   /// Summary description for TabuSearchVRPSampleTest
    34   /// </summary>
    3532  [TestClass]
    3633  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";
    4335
    4436    [TestMethod]
     
    4739    public void CreateTabuSearchVRPSampleTest() {
    4840      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);
    5043    }
    5144    [TestMethod]
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/Samples/VnsTspSampleTest.cs

    r11500 r11594  
    3131
    3232namespace HeuristicLab.Tests {
    33   /// <summary>
    34   /// Summary description for VnsTspSampleTest
    35   /// </summary>
    3633  [TestClass]
    3734  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";
    4436
    4537    [TestMethod]
     
    4840    public void CreateVnsTspSampleTest() {
    4941      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);
    5144    }
    5245    [TestMethod]
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/StorableConstructorTest.cs

    r9783 r11594  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3333  [TestClass]
    3434  public class StorableConstructorTest {
    35 
    36     // Use ClassInitialize to run code before running the first test in the class
    37     [ClassInitialize]
    38     public static void MyClassInitialize(TestContext testContext) {
    39       PluginLoader.Assemblies.Any();
    40     }
    41 
    4235    [TestMethod]
    4336    [TestCategory("General")]
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/ThreadSafeLogTest.cs

    r9783 r11594  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/Breadcrumbs/HeuristicLab.Tests/HeuristicLab-3.3/ToStringTest.cs

    r9783 r11594  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2121
    2222using System;
    23 using System.Linq;
    2423using HeuristicLab.Core;
    2524using HeuristicLab.PluginInfrastructure;
     
    2928  [TestClass]
    3029  public class ToStringTest {
    31 
    3230    private TestContext testContextInstance;
    3331    public TestContext TestContext {
    3432      get { return testContextInstance; }
    3533      set { testContextInstance = value; }
    36     }
    37 
    38     // Use ClassInitialize to run code before running the first test in the class
    39     [ClassInitialize]
    40     public static void MyClassInitialize(TestContext testContext) {
    41       PluginLoader.Assemblies.Any();
    4234    }
    4335
Note: See TracChangeset for help on using the changeset viewer.