Beispiel #1
0
        public void BuildCreateTable_ThrowExceptionIfTableSchemaIsNullOrEmpty(string schema)
        {
            // Arrange
            _testModule.SetSchema(schema);

            Action act = () => _testModule.BuildCreateTable();
            // Act
            var ex = Record.Exception(act);

            // Assert
            Assert.IsType <ArgumentNullException>(ex);
            Assert.Contains(nameof(_testModule.Schema), ex.Message);
        }
Beispiel #2
0
 public PostgreSqlBuilderTests()
 {
     _tableColumns = new List <TableColumn>()
     {
         new TableColumn("FirstName", "varchar(100)", required: true),
         new TableColumn("LastName", "varchar(100)", required: true),
         new TableColumn("IsClient", "boolean"),
         new TableColumn("Phone", "varchar(100)"),
     };
     _schema     = "dbo";
     _tableName  = "tableName";
     _testModule = new PostgreSqlBuilder(_tableColumns);
     _testModule.SetSchema(_schema);
     _testModule.SetTableName(_tableName);
 }