Fixing data migration unit test

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2011-11-09 16:45:30 -08:00
parent 3f41484d53
commit 33e6b6a274

View File

@@ -60,7 +60,6 @@ namespace Orchard.Tests.Modules.CodeGeneration.Commands {
} }
[Test] [Test]
[ExpectedException(typeof(OrchardException))]
public void CreateDataMigrationTestNonExistentFeature() { public void CreateDataMigrationTestNonExistentFeature() {
CodeGenerationCommands codeGenerationCommands = new CodeGenerationCommands(_extensionManager, CodeGenerationCommands codeGenerationCommands = new CodeGenerationCommands(_extensionManager,
_schemaCommandGenerator); _schemaCommandGenerator);
@@ -68,6 +67,8 @@ namespace Orchard.Tests.Modules.CodeGeneration.Commands {
TextWriter textWriterOutput = new StringWriter(); TextWriter textWriterOutput = new StringWriter();
codeGenerationCommands.Context = new CommandContext { Output = textWriterOutput }; codeGenerationCommands.Context = new CommandContext { Output = textWriterOutput };
codeGenerationCommands.CreateDataMigration("feature"); codeGenerationCommands.CreateDataMigration("feature");
Assert.That(textWriterOutput.ToString(), Is.StringContaining("Creating data migration failed"));
} }
} }
} }