public void CreateSchemaWithDefaultConnection() { //Arrange //Act CreateSchemaTask.Create("testschema"); //Assert Assert.True(IfSchemaExistsTask.IsExisting("testschema")); }
public void CreateSchema(IConnectionManager connection) { if (connection.GetType() != typeof(MySqlConnectionManager)) { //Arrange string schemaName = "s" + TestHashHelper.RandomString(9); //Act CreateSchemaTask.Create(connection, schemaName); //Assert Assert.True(IfSchemaExistsTask.IsExisting(connection, schemaName)); } }
public void CreateSchemaWithSpecialChar(IConnectionManager connection) { if (connection.GetType() != typeof(MySqlConnectionManager)) { string QB = connection.QB; string QE = connection.QE; //Arrange string schemaName = $"{QB} s#!/ {QE}"; //Act CreateSchemaTask.Create(connection, schemaName); //Assert Assert.True(IfSchemaExistsTask.IsExisting(connection, schemaName)); } }
public void Drop(IConnectionManager connection) { if (connection.GetType() != typeof(MySqlConnectionManager)) { //Arrange CreateSchemaTask.Create(connection, "testcreateschema"); Assert.True(IfSchemaExistsTask.IsExisting(connection, "testcreateschema")); //Act DropSchemaTask.Drop(connection, "testcreateschema"); //Assert Assert.False(IfSchemaExistsTask.IsExisting(connection, "testcreateschema")); } }
public void IfSchemaeExists(IConnectionManager connection) { if (connection.GetType() != typeof(MySqlConnectionManager)) { //Arrange var existsBefore = IfSchemaExistsTask.IsExisting(connection, "testschema"); CreateSchemaTask.Create(connection, "testschema"); //Act var existsAfter = IfSchemaExistsTask.IsExisting(connection, "testschema"); //Assert Assert.False(existsBefore); Assert.True(existsAfter); } }
public void DropIfExists(IConnectionManager connection) { if (connection.GetType() == typeof(MySqlConnectionManager) || connection.GetType() == typeof(MariaDbConnectionManager) || connection.GetType() == typeof(OracleConnectionManager) ) { return; } //Arrange DropSchemaTask.DropIfExists(connection, "testcreateschema2"); CreateSchemaTask.Create(connection, "testcreateschema2"); Assert.True(IfSchemaExistsTask.IsExisting(connection, "testcreateschema2")); //Act DropSchemaTask.DropIfExists(connection, "testcreateschema2"); //Assert Assert.False(IfSchemaExistsTask.IsExisting(connection, "testcreateschema2")); }