package be.iminds.jfed.gts_highlevel;

import be.iminds.ilabt.jfed.lowlevel.JFedException;
import be.iminds.ilabt.jfed.util.JFedTrustStore;
import be.iminds.jfed.gts_highlevel.controller.GtsConnectionProvider;
import com.google.inject.AbstractModule;

import javax.inject.Singleton;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

/**
 * User: twalcari
 * Date: 9/22/2015
 * Time: 17:42
 */
public class GtsTestModule extends AbstractModule {
    @Override
    protected void configure() {
        bind(JFedTrustStore.class).in(Singleton.class);

        GtsConnectionProvider mockGtsConnectionProvider = mock(GtsConnectionProvider.class);
        try {
            when(mockGtsConnectionProvider.getConnection()).thenReturn(null);
        } catch (JFedException ignored) {
        }

    }
}
