diff --git a/app/src/main/java/com/example/notebook/data/DatabaseTest.kt b/app/src/main/java/com/example/notebook/data/DatabaseTest.kt deleted file mode 100644 index 903d9a6..0000000 --- a/app/src/main/java/com/example/notebook/data/DatabaseTest.kt +++ /dev/null @@ -1,31 +0,0 @@ -package com.example.notebook.data - -import android.content.Context -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.launch - -/** - * Helper untuk test database - * Panggil fungsi ini dari MainActivity untuk test - */ -class DatabaseTest(private val context: Context) { - - private val database = AppDatabase.getDatabase(context) - private val dao = database.notebookDao() - - fun testInsertNotebook() { - CoroutineScope(Dispatchers.IO).launch { - val testNotebook = NotebookEntity( - title = "Notebook Test", - description = "Ini adalah test database", - createdAt = System.currentTimeMillis(), - updatedAt = System.currentTimeMillis(), - sourceCount = 0 - ) - - val id = dao.insertNotebook(testNotebook) - println("✅ Database Test: Notebook berhasil disimpan dengan ID: $id") - } - } -} \ No newline at end of file