2019-05-07 23:36:37 +02:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
2019-07-12 20:38:15 +02:00
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2019-05-07 23:36:37 +02:00
|
|
|
|
|
|
|
package org.mozilla.fenix.components
|
|
|
|
|
|
|
|
import android.content.Context
|
2020-03-11 04:00:27 +01:00
|
|
|
import io.mockk.every
|
2019-05-07 23:36:37 +02:00
|
|
|
import io.mockk.mockk
|
|
|
|
import mozilla.components.browser.session.SessionManager
|
2019-09-26 21:50:50 +02:00
|
|
|
import mozilla.components.browser.state.store.BrowserStore
|
2020-05-29 03:14:56 +02:00
|
|
|
import mozilla.components.browser.thumbnails.storage.ThumbnailStorage
|
2020-03-11 04:00:27 +01:00
|
|
|
import mozilla.components.concept.engine.Engine
|
|
|
|
import mozilla.components.concept.engine.Settings
|
2020-02-11 06:21:10 +01:00
|
|
|
import mozilla.components.concept.fetch.Client
|
2019-11-07 22:44:58 +01:00
|
|
|
import mozilla.components.feature.pwa.WebAppShortcutManager
|
2019-05-07 23:36:37 +02:00
|
|
|
|
2019-10-07 07:20:00 +02:00
|
|
|
class TestCore(context: Context) : Core(context) {
|
2019-05-07 23:36:37 +02:00
|
|
|
|
2020-03-11 04:00:27 +01:00
|
|
|
override val engine = mockk<Engine>(relaxed = true) {
|
2020-07-08 16:53:22 +02:00
|
|
|
every { this@mockk getProperty "settings" } returns mockk<Settings>(relaxed = true)
|
2020-03-11 04:00:27 +01:00
|
|
|
}
|
2019-05-07 23:36:37 +02:00
|
|
|
override val sessionManager = SessionManager(engine)
|
2019-09-26 21:50:50 +02:00
|
|
|
override val store = mockk<BrowserStore>()
|
2020-02-11 06:21:10 +01:00
|
|
|
override val client = mockk<Client>()
|
2019-11-07 22:44:58 +01:00
|
|
|
override val webAppShortcutManager = mockk<WebAppShortcutManager>()
|
2020-05-29 03:14:56 +02:00
|
|
|
override val thumbnailStorage = mockk<ThumbnailStorage>()
|
2019-05-07 23:36:37 +02:00
|
|
|
}
|