-
Notifications
You must be signed in to change notification settings - Fork 601
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[table] turn off automatic creation of tables with a flag. write test…
… to ensure it stays off.
- Loading branch information
Showing
7 changed files
with
85 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
dbflow-tests/src/test/java/com/raizlabs/android/dbflow/models/DontCreateModelTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.raizlabs.android.dbflow.models | ||
|
||
import android.database.sqlite.SQLiteException | ||
import com.raizlabs.android.dbflow.BaseUnitTest | ||
import com.raizlabs.android.dbflow.assertThrowsException | ||
import com.raizlabs.android.dbflow.kotlinextensions.from | ||
import com.raizlabs.android.dbflow.kotlinextensions.list | ||
import com.raizlabs.android.dbflow.kotlinextensions.select | ||
import org.junit.Test | ||
|
||
/** | ||
* Description: | ||
*/ | ||
class DontCreateModelTest : BaseUnitTest() { | ||
|
||
@Test | ||
fun testModelNotCreated() { | ||
assertThrowsException(SQLiteException::class) { | ||
(select from DontCreateModel::class).list | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters