public void ExecuteQuery_QueryIsNullOrWhiteSpace_ThrowsArgumentException(string query)
        {
            // Setup
            string filename = Path.GetRandomFileName();
            string filePath = TestHelper.GetScratchPadPath(nameof(ExecuteQuery_QueryIsNullOrWhiteSpace_ThrowsArgumentException) + filename);

            using (new FileDisposeHelper(filePath))
                using (var databaseFile = new ProjectDatabaseFile(filePath))
                {
                    databaseFile.OpenDatabaseConnection();

                    // Call
                    TestDelegate call = () => databaseFile.ExecuteQuery(query);

                    // Assert
                    TestHelper.AssertThrowsArgumentExceptionAndTestMessage <ArgumentException>(call, "Parameter must be a valid database script.");
                }
        }
        public void ExecuteQuery_InvalidQuery_ThrowsSQLiteException()
        {
            // Setup
            string filename = Path.GetRandomFileName();
            string filePath = TestHelper.GetScratchPadPath(nameof(ExecuteQuery_InvalidQuery_ThrowsSQLiteException) + filename);

            using (new FileDisposeHelper(filePath))
                using (var databaseFile = new ProjectDatabaseFile(filePath))
                {
                    databaseFile.OpenDatabaseConnection();

                    // Call
                    TestDelegate call = () => databaseFile.ExecuteQuery("THIS WILL FAIL");

                    // Assert
                    Assert.Throws <SQLiteException>(call);
                }
        }
        public void ExecuteQuery_ValidQuery_CreatesFile()
        {
            // Setup
            string filename = Path.GetRandomFileName();
            string filePath = TestHelper.GetScratchPadPath(filename);

            using (var databaseFile = new ProjectDatabaseFile(filePath))
            {
                databaseFile.OpenDatabaseConnection();

                // Call
                databaseFile.ExecuteQuery(";");

                // Assert
                Assert.IsTrue(File.Exists(filePath));
            }

            using (new FileDisposeHelper(filePath)) {}
        }