Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/26/13 14:06:27 (11 years ago)
Author:
mkommend
Message:

#2088: Adapted HL-3.3.Tests, Algorithms.DataAnalysis.Tests, and Collections.Test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/DeepCloneableCloningTest.cs

    r9764 r9783  
    4242    }
    4343
     44    private TestContext testContextInstance;
     45    public TestContext TestContext {
     46      get { return testContextInstance; }
     47      set { testContextInstance = value; }
     48    }
     49
    4450    public DeepCloneableCloningTest() {
    4551      excludedTypes = new HashSet<Type>();
     
    5561    }
    5662
    57     private TestContext testContextInstance;
    5863    private readonly HashSet<Type> excludedTypes;
    5964
    60     /// <summary>
    61     ///Gets or sets the test context which provides
    62     ///information about and functionality for the current test run.
    63     ///</summary>
    64     public TestContext TestContext {
    65       get {
    66         return testContextInstance;
    67       }
    68       set {
    69         testContextInstance = value;
    70       }
    71     }
    72 
    73     #region Additional test attributes
    74     //
    75     // You can use the following additional attributes as you write your tests:
    76     //
    77     // Use ClassInitialize to run code before running the first test in the class
    78     // [ClassInitialize()]
    79     // public static void MyClassInitialize(TestContext testContext) { }
    80     //
    81     // Use ClassCleanup to run code after all tests in a class have run
    82     // [ClassCleanup()]
    83     // public static void MyClassCleanup() { }
    84     //
    85     // Use TestInitialize to run code before running each test
    86     // [TestInitialize()]
    87     // public void MyTestInitialize() { }
    88     //
    89     // Use TestCleanup to run code after each test has run
    90     // [TestCleanup()]
    91     // public void MyTestCleanup() { }
    92     //
    93     #endregion
    94 
    9565    [TestMethod]
     66    [TestCategory("General")]
     67    [TestCategory("Essential")]
     68    [TestProperty("Time", "long")]
    9669    [DeploymentItem(@"HeuristicLab-3.3\Resources\SamplesExperimentFinished.hl")]
    9770    public void TestCloningFinishedExperiment() {
     
    10578
    10679    [TestMethod]
     80    [TestCategory("General")]
     81    [TestCategory("Essential")]
     82    [TestProperty("Time", "long")]
    10783    public void TestCloningAllDeepCloneables() {
    10884      PluginLoader.Assemblies.ToArray();
     
    11995        try {
    12096          item = (IDeepCloneable)Activator.CreateInstance(deepCloneableType, nonPublic: false);
    121         } catch { continue; } // no default constructor
     97        }
     98        catch { continue; } // no default constructor
    12299
    123100        IDeepCloneable clone = null;
    124101        try {
    125102          clone = (IDeepCloneable)item.Clone(new Cloner());
    126         } catch (Exception e) {
     103        }
     104        catch (Exception e) {
    127105          TestContext.WriteLine(Environment.NewLine + deepCloneableType.FullName + ":");
    128106          TestContext.WriteLine("ERROR! " + e.GetType().Name + @" was thrown during cloning.
Note: See TracChangeset for help on using the changeset viewer.