public void ShouldCreateSchema()
        {
            var creator = new SchemaInstaller();

            creator.InstallHangfireStorageSchema("hangfiretestschema", ConnectionString);

            using var conn = SelectDialect <DbConnection>(() => new SqlConnection(ConnectionString), () => new NpgsqlConnection(ConnectionString));
            Assert.AreEqual("hangfiretestschema", conn.ExecuteScalar <string>("SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'hangfiretestschema'"));
        }
        public void ShouldIndicateThatSchemaExists()
        {
            var creator = new SchemaInstaller();

            creator.InstallHangfireStorageSchema("schema", ConnectionString);

            var result = creator.HangfireStorageSchemaExists("schema", ConnectionString);

            Assert.True(result);
        }
        public void ShouldCreateSchemaWithDefaultSchemaName()
        {
            var creator = new SchemaInstaller();

            creator.InstallHangfireStorageSchema("", ConnectionString);

            var expected = SelectDialect(() => "HangFire", () => "hangfire");

            using var conn = SelectDialect <DbConnection>(() => new SqlConnection(ConnectionString), () => new NpgsqlConnection(ConnectionString));
            Assert.AreEqual(expected, conn.ExecuteScalar <string>($"SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = '{expected}'"));
        }