Last change
on this file since 10217 was
9820,
checked in by mkommend, 11 years ago
|
#1099: Corrected namespace of NamedItemTest and added it to the basic test list.
|
File size:
1005 bytes
|
Rev | Line | |
---|
[9817] | 1 | using System.Linq;
|
---|
| 2 | using System.Text;
|
---|
| 3 | using HeuristicLab.Common;
|
---|
| 4 | using HeuristicLab.Core;
|
---|
| 5 | using HeuristicLab.PluginInfrastructure;
|
---|
| 6 | using Microsoft.VisualStudio.TestTools.UnitTesting;
|
---|
| 7 |
|
---|
[9820] | 8 | namespace HeuristicLab.Tests {
|
---|
[9817] | 9 | [TestClass]
|
---|
| 10 | public class NamedItemTest {
|
---|
| 11 | [ClassInitialize]
|
---|
| 12 | public static void MyClassInitialize(TestContext testContext) {
|
---|
| 13 | PluginLoader.Assemblies.Any();
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 | [TestMethod]
|
---|
| 17 | [TestCategory("General")]
|
---|
| 18 | [TestCategory("Essential")]
|
---|
| 19 | [TestProperty("Time", "long")]
|
---|
| 20 | public void NamedItemTestNameNotEmpty() {
|
---|
| 21 | StringBuilder sb = new StringBuilder();
|
---|
| 22 | foreach (var namedItem in ApplicationManager.Manager.GetInstances<INamedItem>()) {
|
---|
| 23 | if (string.IsNullOrEmpty(namedItem.Name)) {
|
---|
| 24 | sb.AppendLine(string.Format("{0} does not have a name specified when created by the default ctor.", namedItem.GetType().GetPrettyName()));
|
---|
| 25 | }
|
---|
| 26 | }
|
---|
| 27 | Assert.IsTrue(sb.Length == 0, sb.ToString());
|
---|
| 28 | }
|
---|
| 29 | }
|
---|
| 30 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.