Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OptimizationNetworks/HeuristicLab.Tests/HeuristicLab-3.3/NamedItemTest.cs @ 12214

Last change on this file since 12214 was 11576, checked in by swagner, 10 years ago

#2205: Merged changes r11062:11557 from trunk/sources into branches/OptimizationNetworks

File size: 846 bytes
Line 
1using System.Text;
2using HeuristicLab.Common;
3using HeuristicLab.Core;
4using HeuristicLab.PluginInfrastructure;
5using Microsoft.VisualStudio.TestTools.UnitTesting;
6
7namespace HeuristicLab.Tests {
8  [TestClass]
9  public class NamedItemTest {
10    [TestMethod]
11    [TestCategory("General")]
12    [TestCategory("Essential")]
13    [TestProperty("Time", "long")]
14    public void NamedItemTestNameNotEmpty() {
15      StringBuilder sb = new StringBuilder();
16      foreach (var namedItem in ApplicationManager.Manager.GetInstances<INamedItem>()) {
17        if (string.IsNullOrEmpty(namedItem.Name)) {
18          sb.AppendLine(string.Format("{0} does not have a name specified when created by the default ctor.", namedItem.GetType().GetPrettyName()));
19        }
20      }
21      Assert.IsTrue(sb.Length == 0, sb.ToString());
22    }
23  }
24}
Note: See TracBrowser for help on using the repository browser.