public void DropShouldCloseConnections()
        {
            using (var testdb = new SqlWorkflowInstanceStoreTest())
            {
                // Arrange
                testdb.Create();

                // Act
                using (var connection = new SqlConnection(testdb.ConnectionString))
                {
                    // Open a connection and keep it open
                    connection.Open();

                    // DropInstanceStore will force the connection closed and drop the database
                    SqlWorkflowInstanceStoreManager.DropInstanceStore(
                        testdb.DatabaseName,
                        testdb.ConnectionString);
                }

                // Assert
                Assert.IsFalse(testdb.Exists());
            }
        }
        public void DropShouldDropDatabase()
        {
            using (var testdb = new SqlWorkflowInstanceStoreTest())
            {
                // Arrange
                testdb.CreateInstanceStore();

                // Act
                SqlWorkflowInstanceStoreManager.DropInstanceStore(
                    testdb.DatabaseName,
                    testdb.ConnectionString);

                // Assert
                Assert.IsFalse(testdb.Exists());
            }
        }
        public void CreateShouldCreateInstanceStore()
        {
            using (var testdb = new SqlWorkflowInstanceStoreTest())
            {
                // Arrange

                // Act
                SqlWorkflowInstanceStoreManager.CreateInstanceStore(
                    testdb.DatabaseName,
                    testdb.ConnectionString,
                    true);

                // Assert
                Assert.IsTrue(testdb.Exists(), "Database does not exist");
                testdb.AssertDatabaseIsConfigured();
            }
        }