Last change
on this file since 7489 was
7470,
checked in by abeham, 13 years ago
|
#1614
- Removed incompatible problem linhp318.tsp (contains fixed edges)
- Fixed AssemblyInfo for TSPLIB
- Added unit tests
- Worked on assignment / solution view
|
File size:
931 bytes
|
Rev | Line | |
---|
[7470] | 1 | using System;
|
---|
| 2 | using System.Text;
|
---|
| 3 | using HeuristicLab.Problems.Instances.ElloumiCTAP;
|
---|
| 4 | using Microsoft.VisualStudio.TestTools.UnitTesting;
|
---|
| 5 |
|
---|
| 6 | namespace UnitTests {
|
---|
| 7 | [TestClass()]
|
---|
| 8 | public class ElloumiCTAPInstanceProviderTest {
|
---|
| 9 |
|
---|
| 10 | [TestMethod()]
|
---|
| 11 | public void GetElloumiCTAPInstanceTest() {
|
---|
| 12 | var target = new ElloumiCTAPInstanceProvider();
|
---|
| 13 | StringBuilder erroneousInstances = new StringBuilder();
|
---|
| 14 | int count = 0;
|
---|
| 15 | foreach (var id in target.GetInstanceDescriptors()) {
|
---|
| 16 | try {
|
---|
| 17 | target.GetInstance(id);
|
---|
| 18 | } catch (Exception ex) {
|
---|
| 19 | erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
|
---|
| 20 | }
|
---|
| 21 | count++;
|
---|
| 22 | }
|
---|
| 23 | Assert.IsTrue(count > 0, "No problem instances were found.");
|
---|
| 24 | Assert.IsTrue(erroneousInstances.Length == 0, "Some instances could not be parsed: " + Environment.NewLine + erroneousInstances.ToString());
|
---|
| 25 | }
|
---|
| 26 | }
|
---|
| 27 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.