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
@RunWith(JUnitPlatform::class) | |
class DistancesPresenterSpec : Spek({ | |
rxGroup("DistancePresenter") { | |
val view: DistancesPresenter.View = mock() | |
val roundInteractor: RoundInteractor = mock() | |
val tested = DistancesPresenter(roundInteractor) | |
var holeSubject: PublishSubject<Hole> = PublishSubject.create() |
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
class DistancesPresenter @Inject constructor(private val roundInteractor: RoundInteractor) { | |
private val subscriptions by lazy { CompositeSubscription() } | |
private lateinit var view: View | |
fun attachView(view: View) { | |
this.view = view | |
} | |
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
class DistancesView : FrameLayout, DistancesPresenter.View { | |
@Inject lateinit var presenter: DistancesPresenter | |
constructor(context: Context?) : super(context) { | |
init() | |
} | |
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) { | |
init() |