package ru.otus.mobile.guice;

import com.google.inject.AbstractModule;
import com.google.inject.Provides;
import io.appium.java_client.android.AndroidDriver;
import ru.otus.mobile.config.TestAccount;
import ru.otus.mobile.config.TestContext;

public final class SessionModule extends AbstractModule {
    private final TestContext testContext;

    public SessionModule(TestContext testContext) {
        this.testContext = testContext;
    }

    @Override
    protected void configure() {
        bind(TestContext.class).toInstance(testContext);
    }

    @Provides
    TestAccount testAccount() {
        return testContext.account();
    }

    @Provides
    AndroidDriver androidDriver() {
        return testContext.driver();
    }
}
