Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/20/14 09:30:37 (10 years ago)
Author:
pfleck
Message:

#2208 merged changes from #2225 to enable all CVRP provider for the orienteering problem.

Location:
branches/HeuristicLab.Problems.Orienteering
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.Orienteering

  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Tests

  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Tests/HeuristicLab.Problems.VehicleRouting-3.4/VRPInstancesTest.cs

    r11185 r11289  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using System.Linq;
    2425using System.Text;
    25 using HeuristicLab.PluginInfrastructure;
    26 using HeuristicLab.Problems.Instances.VehicleRouting;
     26using HeuristicLab.Problems.Instances;
     27using HeuristicLab.Tests;
    2728using Microsoft.VisualStudio.TestTools.UnitTesting;
    2829
     
    3031  [TestClass]
    3132  public class VRPInstancesTest {
     33    [ClassInitialize]
     34    public static void MyClassInitialize(TestContext testContext) {
     35      PluginLoader.Assemblies.Any();
     36    }
     37
    3238    [TestMethod]
    3339    [TestCategory("Problems.VehicleRouting")]
    3440    [TestProperty("Time", "long")]
    3541    public void TestVRPInstances() {
    36       var providers = ApplicationManager.Manager.GetInstances<VRPInstanceProvider>();
    3742      var vrp = new VehicleRoutingProblem();
     43      var providers = ProblemInstanceManager.GetProviders(vrp);
    3844      var failedInstances = new StringBuilder();
    3945
     
    4147
    4248      foreach (var provider in providers) {
    43         var instances = provider.GetDataDescriptors();
     49        IEnumerable<IDataDescriptor> instances = ((dynamic)provider).GetDataDescriptors();
    4450        Assert.IsTrue(instances.Any(), "No instances could be found.");
    4551
     
    4753          try {
    4854            // throws InvalidOperationException if zero or more than one interpreter is found
    49             vrp.Load(provider.LoadData(instance));
     55            ((dynamic)vrp).Load(((dynamic)provider).LoadData(instance));
    5056          } catch (Exception exc) {
    5157            failedInstances.AppendLine(instance + ": " + exc.Message);
  • branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Tests/HeuristicLab.Tests.csproj

    r11091 r11289  
    330330      <Private>False</Private>
    331331    </Reference>
     332    <Reference Include="Microsoft.CSharp" />
    332333    <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
    333334      <Private>false</Private>
Note: See TracChangeset for help on using the changeset viewer.