Last change
on this file since 12962 was
11514,
checked in by jkarder, 10 years ago
|
#2211:
- updated/added unit tests
- added AssemblyInitialize method to load all plugins, create output directories for (script) samples and initialize the MainForm
- script code is now stored in test resource files
- refactored unit tests
- updated (script) samples
- added Test.cmd
|
File size:
846 bytes
|
Rev | Line | |
---|
[11514] | 1 | using System.Text;
|
---|
[9817] | 2 | using HeuristicLab.Common;
|
---|
| 3 | using HeuristicLab.Core;
|
---|
| 4 | using HeuristicLab.PluginInfrastructure;
|
---|
| 5 | using Microsoft.VisualStudio.TestTools.UnitTesting;
|
---|
| 6 |
|
---|
[9820] | 7 | namespace HeuristicLab.Tests {
|
---|
[9817] | 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.