public void ErrorIsNotReturnedWhenSchemaNameIsSet()
        {
            var expression = new CreateSchemaExpression { SchemaName = "schema1" };

            var errors = ValidationHelper.CollectErrors(expression);
            Assert.That(errors.Count, Is.EqualTo(0));
        }
        public void ErrorIsReturnedWhenSchemaNameIsEmptyString()
        {
            var expression = new CreateSchemaExpression { SchemaName = String.Empty };

            var errors = ValidationHelper.CollectErrors(expression);
            errors.ShouldContain(ErrorMessages.SchemaNameCannotBeNullOrEmpty);
        }
        public void CanCreateSchema()
        {
            var expression = new CreateSchemaExpression
            {
                SchemaName = "TestSchema"
            };

            generator.Generate(expression);
        }
 //All Schema method throw by default as only Sql server 2005 and up supports them.
 public override string Generate(CreateSchemaExpression expression)
 {
     return compatabilityMode.HandleCompatabilty("Schemas are not supported");
 }
Пример #5
0
 public override string Generate(CreateSchemaExpression expression)
 {
     throw new NotImplementedException();
 }
 public override void CanCreateSchema()
 {
     var expression = new CreateSchemaExpression() { SchemaName = "TestSchema" };
     var result = _generator.Generate(expression);
     result.ShouldBe(string.Empty);
 }
 public void Schema(string schemaName)
 {
     var expression = new CreateSchemaExpression { SchemaName = schemaName };
     _context.Expressions.Add(expression);
 }
 public override string Generate(CreateSchemaExpression expression)
 {
     return string.Format("CREATE SCHEMA {0}", Quoter.QuoteSchemaName(expression.SchemaName));
 }
 //All Schema method throw by default as only Sql server 2005 and up supports them.
 public override string Generate(CreateSchemaExpression expression)
 {
     throw new DatabaseOperationNotSupportedExecption();
 }
Пример #10
0
 public virtual void Process(CreateSchemaExpression expression)
 {
     Process(Generator.Generate(expression));
 }
 public void Truncate(CreateSchemaExpression expression) { }
 public void CanCreateSchema()
 {
     var expression = new CreateSchemaExpression {SchemaName = "Schema1"};
     var sql = generator.Generate(expression);
     sql.ShouldBe("CREATE SCHEMA \"Schema1\"");
 }
Пример #13
0
 public abstract string Generate(CreateSchemaExpression expression);
 public override string Generate(CreateSchemaExpression expression)
 {
     return String.Format(CreateSchema, Quoter.QuoteSchemaName(expression.SchemaName));
 }
 public override string Generate(CreateSchemaExpression expression)
 {
     return String.Format("CREATE SCHEMA [{0}]", expression.SchemaName);
 }