1 /*
2  * Copyright (C) 2017 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package androidx.room
18 
19 import androidx.room.migration.AutoMigrationSpec
20 import androidx.room.migration.Migration
21 import androidx.sqlite.db.SupportSQLiteOpenHelper
22 import kotlin.reflect.KClass
23 import org.mockito.kotlin.mock
24 
25 internal class BuilderTest_TestDatabase_Impl : BuilderTest.TestDatabase() {
26     lateinit var mConfig: DatabaseConfiguration
27     var mAutoMigrations = listOf<Migration>(BuilderTest.EmptyMigration(1, 2))
28 
initnull29     override fun init(configuration: DatabaseConfiguration) {
30         super.init(configuration)
31         mConfig = configuration
32     }
33 
34     @Deprecated("No longer implemented by generated")
createOpenHelpernull35     override fun createOpenHelper(config: DatabaseConfiguration): SupportSQLiteOpenHelper {
36         return mock()
37     }
38 
createOpenDelegatenull39     override fun createOpenDelegate(): RoomOpenDelegate {
40         return mock()
41     }
42 
createInvalidationTrackernull43     override fun createInvalidationTracker(): InvalidationTracker {
44         return mock()
45     }
46 
clearAllTablesnull47     override fun clearAllTables() {}
48 
createAutoMigrationsnull49     override fun createAutoMigrations(
50         autoMigrationSpecs: Map<KClass<out AutoMigrationSpec>, AutoMigrationSpec>
51     ): List<Migration> {
52         return mAutoMigrations
53     }
54 }
55