Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/20/13 17:03:31 (11 years ago)
Author:
mkommend
Message:

#2088: Merged all changesets regarding the unit test restructuring in the stable branch.

Location:
stable
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Tests

  • stable/HeuristicLab.Tests/HeuristicLab.Problems.Instances.DataAnalysis-3.3/ClassificationInstanceProviderTest.cs

    r9456 r9885  
    2222using System;
    2323using System.Text;
    24 using HeuristicLab.Problems.Instances.DataAnalysis;
    2524using Microsoft.VisualStudio.TestTools.UnitTesting;
    2625
    27 namespace HeuristicLab.Problems.Instances.DataAnalysis_34.Tests {
     26namespace HeuristicLab.Problems.Instances.DataAnalysis.Tests {
    2827  [TestClass()]
    2928  public class ClassificationInstanceProviderTest {
    3029
    31     [TestMethod()]
     30    [TestMethod]
     31    [TestCategory("Problems.Instances")]
     32    [TestProperty("Time", "short")]
    3233    public void UCIInstanceTest() {
    3334      var target = new UCIInstanceProvider();
     
    3738        try {
    3839          target.LoadData(id);
    39         }
    40         catch (Exception ex) {
     40        } catch (Exception ex) {
    4141          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
    4242        }
  • stable/HeuristicLab.Tests/HeuristicLab.Problems.Instances.DataAnalysis-3.3/RegressionInstanceProviderTest.cs

    r9456 r9885  
    2222using System;
    2323using System.Text;
    24 using HeuristicLab.Problems.Instances.DataAnalysis;
    2524using Microsoft.VisualStudio.TestTools.UnitTesting;
    2625
    27 namespace HeuristicLab.Problems.Instances.DataAnalysis_34.Tests {
     26namespace HeuristicLab.Problems.Instances.DataAnalysis.Tests {
    2827  [TestClass()]
    2928  public class RegressionInstanceProviderTest {
    3029
    31     [TestMethod()]
     30    [TestMethod]
     31    [TestCategory("Problems.Instances")]
     32    [TestProperty("Time", "medium")]
    3233    public void GetKeijzerInstanceTest() {
    3334      var target = new KeijzerInstanceProvider();
     
    3738        try {
    3839          target.LoadData(id);
    39         }
    40         catch (Exception ex) {
     40        } catch (Exception ex) {
    4141          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
    4242        }
     
    4747    }
    4848
    49     [TestMethod()]
     49    [TestMethod]
     50    [TestCategory("Problems.Instances")]
     51    [TestProperty("Time", "short")]
    5052    public void GetKornInstanceTest() {
    5153      var target = new KornsInstanceProvider();
     
    5557        try {
    5658          target.LoadData(id);
    57         }
    58         catch (Exception ex) {
     59        } catch (Exception ex) {
    5960          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
    6061        }
     
    6566    }
    6667
    67     [TestMethod()]
     68    [TestMethod]
     69    [TestCategory("Problems.Instances")]
     70    [TestProperty("Time", "short")]
    6871    public void GetNguyenInstanceTest() {
    6972      var target = new NguyenInstanceProvider();
     
    7376        try {
    7477          target.LoadData(id);
    75         }
    76         catch (Exception ex) {
     78        } catch (Exception ex) {
    7779          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
    7880        }
     
    8385    }
    8486
    85     [TestMethod()]
     87    [TestMethod]
     88    [TestCategory("Problems.Instances")]
     89    [TestProperty("Time", "short")]
    8690    public void GetRealWorldInstanceTest() {
    8791      var target = new RegressionRealWorldInstanceProvider();
     
    9195        try {
    9296          target.LoadData(id);
    93         }
    94         catch (Exception ex) {
     97        } catch (Exception ex) {
    9598          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
    9699        }
     
    101104    }
    102105
    103     [TestMethod()]
     106    [TestMethod]
     107    [TestCategory("Problems.Instances")]
     108    [TestProperty("Time", "short")]
    104109    public void GetVariousInstanceTest() {
    105110      var target = new VariousInstanceProvider();
     
    109114        try {
    110115          target.LoadData(id);
    111         }
    112         catch (Exception ex) {
     116        } catch (Exception ex) {
    113117          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
    114118        }
     
    119123    }
    120124
    121     [TestMethod()]
     125    [TestMethod]
     126    [TestCategory("Problems.Instances")]
     127    [TestProperty("Time", "short")]
    122128    public void GetVladislavlevaInstanceTest() {
    123129      var target = new VladislavlevaInstanceProvider();
     
    127133        try {
    128134          target.LoadData(id);
    129         }
    130         catch (Exception ex) {
     135        } catch (Exception ex) {
    131136          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
    132137        }
  • stable/HeuristicLab.Tests/HeuristicLab.Problems.Instances.DataAnalysis-3.3/TableFileParserTest.cs

    r9651 r9885  
    2222using System;
    2323using System.IO;
    24 using HeuristicLab.Problems.Instances.DataAnalysis;
    2524using Microsoft.VisualStudio.TestTools.UnitTesting;
    2625
    27 namespace HeuristicLab.Problems.Instances.DataAnalysis_34.Tests {
    28 
     26namespace HeuristicLab.Problems.Instances.DataAnalysis.Tests {
    2927  [TestClass()]
    3028  public class TableFileParserTest {
    31 
    32     [TestMethod]
     29    [TestMethod]
     30    [TestCategory("Problems.Instances")]
     31    [TestProperty("Time", "short")]
    3332    public void ParseCSV() {
    3433      string tempFileName = Path.GetTempFileName();
     
    4645        Assert.AreEqual(4, parser.Columns);
    4746        Assert.AreEqual(parser.Values[3][0], 3.14);
    48       }
    49       finally {
    50         File.Delete(tempFileName);
    51       }
    52     }
    53     [TestMethod]
     47      } finally {
     48        File.Delete(tempFileName);
     49      }
     50    }
     51
     52    [TestMethod]
     53    [TestCategory("Problems.Instances")]
     54    [TestProperty("Time", "short")]
    5455    public void ParseCSVWithNames() {
    5556      string tempFileName = Path.GetTempFileName();
     
    6869        Assert.AreEqual(4, parser.Columns);
    6970        Assert.AreEqual(parser.Values[3][0], 3.14);
    70       }
    71       finally {
    72         File.Delete(tempFileName);
    73       }
    74     }
    75 
    76     [TestMethod]
     71      } finally {
     72        File.Delete(tempFileName);
     73      }
     74    }
     75
     76    [TestMethod]
     77    [TestCategory("Problems.Instances")]
     78    [TestProperty("Time", "short")]
    7779    public void ParseGermanCSV() {
    7880      string tempFileName = Path.GetTempFileName();
     
    9092        Assert.AreEqual(4, parser.Columns);
    9193        Assert.AreEqual(parser.Values[3][0], 3.14);
    92       }
    93       finally {
    94         File.Delete(tempFileName);
    95       }
    96     }
    97 
    98     [TestMethod]
     94      } finally {
     95        File.Delete(tempFileName);
     96      }
     97    }
     98
     99    [TestMethod]
     100    [TestCategory("Problems.Instances")]
     101    [TestProperty("Time", "short")]
    99102    public void ParseGermanCSVWithNames() {
    100103      string tempFileName = Path.GetTempFileName();
     
    113116        Assert.AreEqual(4, parser.Columns);
    114117        Assert.AreEqual(parser.Values[3][0], 3.14);
    115       }
    116       finally {
    117         File.Delete(tempFileName);
    118       }
    119     }
    120 
    121     [TestMethod]
     118      } finally {
     119        File.Delete(tempFileName);
     120      }
     121    }
     122
     123    [TestMethod]
     124    [TestCategory("Problems.Instances")]
     125    [TestProperty("Time", "short")]
    122126    public void ParseGermanCSVWithoutCommas() {
    123127      string tempFileName = Path.GetTempFileName();
     
    135139        Assert.AreEqual(4, parser.Columns);
    136140        Assert.AreEqual((double)parser.Values[3][0], 3);
    137       }
    138       finally {
    139         File.Delete(tempFileName);
    140       }
    141     }
    142     [TestMethod]
     141      } finally {
     142        File.Delete(tempFileName);
     143      }
     144    }
     145
     146    [TestMethod]
     147    [TestCategory("Problems.Instances")]
     148    [TestProperty("Time", "short")]
    143149    public void ParseGermanCSVWithoutCommasWithNames() {
    144150      string tempFileName = Path.GetTempFileName();
     
    157163        Assert.AreEqual(4, parser.Columns);
    158164        Assert.AreEqual((double)parser.Values[3][0], 3);
    159       }
    160       finally {
    161         File.Delete(tempFileName);
    162       }
    163     }
    164 
    165     [TestMethod]
     165      } finally {
     166        File.Delete(tempFileName);
     167      }
     168    }
     169
     170    [TestMethod]
     171    [TestCategory("Problems.Instances")]
     172    [TestProperty("Time", "short")]
    166173    public void ParseEnglishCSVWithoutCommas() {
    167174      string tempFileName = Path.GetTempFileName();
     
    179186        Assert.AreEqual(4, parser.Columns);
    180187        Assert.AreEqual((double)parser.Values[3][0], 3);
    181       }
    182       finally {
    183         File.Delete(tempFileName);
    184       }
    185     }
    186 
    187     [TestMethod]
     188      } finally {
     189        File.Delete(tempFileName);
     190      }
     191    }
     192
     193    [TestMethod]
     194    [TestCategory("Problems.Instances")]
     195    [TestProperty("Time", "short")]
    188196    public void ParseEnglishCSVWithoutCommasWithoutSpace() {
    189197      string tempFileName = Path.GetTempFileName();
     
    201209        Assert.AreEqual(4, parser.Columns);
    202210        Assert.AreEqual((double)parser.Values[3][0], 3);
    203       }
    204       finally {
    205         File.Delete(tempFileName);
    206       }
    207     }
    208 
    209     [TestMethod]
     211      } finally {
     212        File.Delete(tempFileName);
     213      }
     214    }
     215
     216    [TestMethod]
     217    [TestCategory("Problems.Instances")]
     218    [TestProperty("Time", "short")]
    210219    public void ParseEnglishCSVWithoutCommasWithNames() {
    211220      string tempFileName = Path.GetTempFileName();
     
    224233        Assert.AreEqual(4, parser.Columns);
    225234        Assert.AreEqual((double)parser.Values[3][0], 3);
    226       }
    227       finally {
    228         File.Delete(tempFileName);
    229       }
    230     }
    231 
    232     [TestMethod]
     235      } finally {
     236        File.Delete(tempFileName);
     237      }
     238    }
     239
     240    [TestMethod]
     241    [TestCategory("Problems.Instances")]
     242    [TestProperty("Time", "short")]
    233243    public void ParseEnglishCSVWithoutCommasWithoutSpacesWithNames() {
    234244      string tempFileName = Path.GetTempFileName();
     
    247257        Assert.AreEqual(4, parser.Columns);
    248258        Assert.AreEqual((double)parser.Values[3][0], 3);
    249       }
    250       finally {
    251         File.Delete(tempFileName);
    252       }
    253     }
    254 
    255 
    256     [TestMethod]
     259      } finally {
     260        File.Delete(tempFileName);
     261      }
     262    }
     263
     264
     265    [TestMethod]
     266    [TestCategory("Problems.Instances")]
     267    [TestProperty("Time", "short")]
    257268    public void ParseGermanTabSeparated() {
    258269      string tempFileName = Path.GetTempFileName();
     
    270281        Assert.AreEqual(4, parser.Columns);
    271282        Assert.AreEqual((double)parser.Values[3][0], 3.14);
    272       }
    273       finally {
    274         File.Delete(tempFileName);
    275       }
    276     }
    277 
    278     [TestMethod]
     283      } finally {
     284        File.Delete(tempFileName);
     285      }
     286    }
     287
     288    [TestMethod]
     289    [TestCategory("Problems.Instances")]
     290    [TestProperty("Time", "short")]
    279291    public void ParseGermanTabSeparatedWithNames() {
    280292      string tempFileName = Path.GetTempFileName();
     
    293305        Assert.AreEqual(4, parser.Columns);
    294306        Assert.AreEqual((double)parser.Values[3][0], 3.14);
    295       }
    296       finally {
    297         File.Delete(tempFileName);
    298       }
    299     }
    300 
    301     [TestMethod]
     307      } finally {
     308        File.Delete(tempFileName);
     309      }
     310    }
     311
     312    [TestMethod]
     313    [TestCategory("Problems.Instances")]
     314    [TestProperty("Time", "short")]
    302315    public void ParseEnglishTabSeparated() {
    303316      string tempFileName = Path.GetTempFileName();
     
    315328        Assert.AreEqual(4, parser.Columns);
    316329        Assert.AreEqual((double)parser.Values[3][0], 3.14);
    317       }
    318       finally {
    319         File.Delete(tempFileName);
    320       }
    321     }
    322     [TestMethod]
     330      } finally {
     331        File.Delete(tempFileName);
     332      }
     333    }
     334
     335    [TestMethod]
     336    [TestCategory("Problems.Instances")]
     337    [TestProperty("Time", "short")]
    323338    public void ParseEnglishTabSeparatedWithNames() {
    324339      string tempFileName = Path.GetTempFileName();
     
    337352        Assert.AreEqual(4, parser.Columns);
    338353        Assert.AreEqual((double)parser.Values[3][0], 3.14);
    339       }
    340       finally {
    341         File.Delete(tempFileName);
    342       }
    343     }
    344 
    345     [TestMethod]
     354      } finally {
     355        File.Delete(tempFileName);
     356      }
     357    }
     358
     359    [TestMethod]
     360    [TestCategory("Problems.Instances")]
     361    [TestProperty("Time", "short")]
    346362    public void ParseTabSeparatedWithoutCommas() {
    347363      string tempFileName = Path.GetTempFileName();
     
    359375        Assert.AreEqual(4, parser.Columns);
    360376        Assert.AreEqual((double)parser.Values[3][0], 3);
    361       }
    362       finally {
    363         File.Delete(tempFileName);
    364       }
    365     }
    366     [TestMethod]
     377      } finally {
     378        File.Delete(tempFileName);
     379      }
     380    }
     381
     382    [TestMethod]
     383    [TestCategory("Problems.Instances")]
     384    [TestProperty("Time", "short")]
    367385    public void ParseTabSeparatedWithoutCommasWithNames() {
    368386      string tempFileName = Path.GetTempFileName();
     
    381399        Assert.AreEqual(4, parser.Columns);
    382400        Assert.AreEqual((double)parser.Values[3][0], 3);
    383       }
    384       finally {
    385         File.Delete(tempFileName);
    386       }
    387     }
    388 
    389     [TestMethod]
     401      } finally {
     402        File.Delete(tempFileName);
     403      }
     404    }
     405
     406    [TestMethod]
     407    [TestCategory("Problems.Instances")]
     408    [TestProperty("Time", "short")]
    390409    public void ParseWithEmtpyLines() {
    391410      string tempFileName = Path.GetTempFileName();
     
    403422        Assert.AreEqual(4, parser.Rows);
    404423        Assert.AreEqual(4, parser.Columns);
    405       }
    406       finally {
    407         File.Delete(tempFileName);
    408       }
    409     }
    410 
    411     [TestMethod]
     424      } finally {
     425        File.Delete(tempFileName);
     426      }
     427    }
     428
     429    [TestMethod]
     430    [TestCategory("Problems.Instances")]
     431    [TestProperty("Time", "short")]
    412432    public void ParseGermanSpaceSeparated() {
    413433      string tempFileName = Path.GetTempFileName();
     
    425445        Assert.AreEqual(4, parser.Columns);
    426446        Assert.AreEqual((double)parser.Values[3][0], 3.14);
    427       }
    428       finally {
    429         File.Delete(tempFileName);
    430       }
    431     }
    432     [TestMethod]
     447      } finally {
     448        File.Delete(tempFileName);
     449      }
     450    }
     451
     452    [TestMethod]
     453    [TestCategory("Problems.Instances")]
     454    [TestProperty("Time", "short")]
    433455    public void ParseGermanSpaceSeparatedWithNames() {
    434456      string tempFileName = Path.GetTempFileName();
     
    447469        Assert.AreEqual(4, parser.Columns);
    448470        Assert.AreEqual((double)parser.Values[3][0], 3.14);
    449       }
    450       finally {
    451         File.Delete(tempFileName);
    452       }
    453     }
    454 
    455     [TestMethod]
     471      } finally {
     472        File.Delete(tempFileName);
     473      }
     474    }
     475
     476    [TestMethod]
     477    [TestCategory("Problems.Instances")]
     478    [TestProperty("Time", "short")]
    456479    public void ParseEnglishSpaceSeparated() {
    457480      string tempFileName = Path.GetTempFileName();
     
    469492        Assert.AreEqual(4, parser.Columns);
    470493        Assert.AreEqual((double)parser.Values[3][0], 3.14);
    471       }
    472       finally {
    473         File.Delete(tempFileName);
    474       }
    475     }
    476     [TestMethod]
     494      } finally {
     495        File.Delete(tempFileName);
     496      }
     497    }
     498
     499    [TestMethod]
     500    [TestCategory("Problems.Instances")]
     501    [TestProperty("Time", "short")]
    477502    public void ParseEnglishSpaceSeparatedWithNames() {
    478503      string tempFileName = Path.GetTempFileName();
     
    491516        Assert.AreEqual(4, parser.Columns);
    492517        Assert.AreEqual((double)parser.Values[3][0], 3.14);
    493       }
    494       finally {
    495         File.Delete(tempFileName);
    496       }
    497     }
    498 
    499     [TestMethod]
     518      } finally {
     519        File.Delete(tempFileName);
     520      }
     521    }
     522
     523    [TestMethod]
     524    [TestCategory("Problems.Instances")]
     525    [TestProperty("Time", "short")]
    500526    public void ParseEnglishSpaceSeparatedWithNamesManyColumns() {
    501527      string tempFileName = Path.GetTempFileName();
     
    511537        Assert.AreEqual(3, parser.Rows);
    512538        Assert.AreEqual(4507, parser.Columns);
    513       }
    514       finally {
    515         File.Delete(tempFileName);
    516       }
    517     }
    518 
    519     [TestMethod]
     539      } finally {
     540        File.Delete(tempFileName);
     541      }
     542    }
     543
     544    [TestMethod]
     545    [TestCategory("Problems.Instances")]
     546    [TestProperty("Time", "short")]
    520547    public void ParseSpaceSeparatedWithoutCommas() {
    521548      string tempFileName = Path.GetTempFileName();
     
    533560        Assert.AreEqual(4, parser.Columns);
    534561        Assert.AreEqual((double)parser.Values[3][0], 3);
    535       }
    536       finally {
    537         File.Delete(tempFileName);
    538       }
    539     }
    540     [TestMethod]
     562      } finally {
     563        File.Delete(tempFileName);
     564      }
     565    }
     566
     567    [TestMethod]
     568    [TestCategory("Problems.Instances")]
     569    [TestProperty("Time", "short")]
    541570    public void ParseSpaceSeparatedWithoutCommasWithNames() {
    542571      string tempFileName = Path.GetTempFileName();
     
    555584        Assert.AreEqual(4, parser.Columns);
    556585        Assert.AreEqual((double)parser.Values[3][0], 3);
    557       }
    558       finally {
     586      } finally {
    559587        File.Delete(tempFileName);
    560588      }
Note: See TracChangeset for help on using the changeset viewer.