Inheritance: Orchard.Commands.DefaultOrchardCommandHandler
        public void CreateDataMigrationTestNonExistentFeature() {
            CodeGenerationCommands codeGenerationCommands = new CodeGenerationCommands(_extensionManager,
                _schemaCommandGenerator);

            TextWriter textWriterOutput = new StringWriter();
            codeGenerationCommands.Context = new CommandContext { Output = textWriterOutput };
            codeGenerationCommands.CreateDataMigration("feature");
        }
コード例 #2
0
        public void CreateDataMigrationTestNonExistentFeature() {
            CodeGenerationCommands codeGenerationCommands = new CodeGenerationCommands(_extensionManager,
                _schemaCommandGenerator);

            TextWriter textWriterOutput = new StringWriter();
            codeGenerationCommands.Context = new CommandContext { Output = textWriterOutput };
            codeGenerationCommands.CreateDataMigration("feature");

            Assert.That(textWriterOutput.ToString(), Is.StringContaining("Creating data migration failed"));
        }