<commit_before>package eu.ydp.empiria.player.client;

import static org.mockito.Mockito.withSettings;

import com.google.inject.assistedinject.FactoryModuleBuilder;

import eu.ydp.empiria.player.client.controller.body.IPlayerContainersAccessor;
import eu.ydp.empiria.player.client.controller.extensions.internal.media.external.ExternalFullscreenVideoConnector;
import eu.ydp.empiria.player.client.controller.extensions.internal.media.external.FullscreenVideoExecutor;
import eu.ydp.empiria.player.client.controller.extensions.internal.sound.MediaExecutorsStopper;
import eu.ydp.empiria.player.client.controller.extensions.internal.sound.SingleMediaPlayback;
import eu.ydp.empiria.player.client.controller.extensions.internal.sound.external.ExternalMediaEngine;
import eu.ydp.empiria.player.client.controller.extensions.internal.sound.external.connector.MediaConnector;
import eu.ydp.empiria.player.client.controller.extensions.internal.sound.external.connector.MediaConnectorListener;
import eu.ydp.empiria.player.client.controller.extensions.internal.stickies.IStickieProperties;
import eu.ydp.empiria.player.client.controller.extensions.internal.stickies.IStickieView;
import eu.ydp.empiria.player.client.controller.extensions.internal.stickies.StickieFactory;
import eu.ydp.empiria.player.client.controller.extensions.internal.stickies.StickieView;
import eu.ydp.empiria.player.client.controller.extensions.internal.stickies.StickiesProcessorExtension;
import eu.ydp.empiria.player.client.controller.extensions.internal.stickies.position.CenterPositionFinder;
import eu.ydp.empiria.player.client.controller.extensions.internal.stickies.position.RangeCreator;
import eu.ydp.empiria.player.client.controller.extensions.internal.stickies.position.ViewportHelper;
import eu.ydp.empiria.player.client.controller.extensions.internal.stickies.position.WidgetSizeHelper;
import eu.ydp.empiria.player.client.controller.extensions.internal.stickies.presenter.IStickiePresenter;
import eu.ydp.empiria.player.client.controller.extensions.internal.stickies.presenter.StickiePresenter;
import eu.ydp.empiria.player.client.module.connection.presenter.translation.SurfaceDimensionsDelegate;
import eu.ydp.empiria.player.client.module.connection.presenter.translation.SurfaceDimensionsFinder;
import eu.ydp.empiria.player.client.module.connection.presenter.translation.SurfacePointTranslator;
import eu.ydp.empiria.player.client.module.connection.presenter.translation.SurfacePositionFinder;
import eu.ydp.empiria.player.client.module.labelling.structure.LabellingModuleJAXBParserFactory;
import eu.ydp.empiria.player.client.module.labelling.view.LabellingChildView;
import eu.ydp.empiria.player.client.module.labelling.view.LabellingView;
import eu.ydp.empiria.player.client.module.media.external.FullscreenVideoMediaWrapper;
import eu.ydp.empiria.player.client.module.object.impl.ExternalFullscreenVideoImpl;
import eu.ydp.empiria.player.client.resources.StyleNameConstants;
import eu.ydp.empiria.player.client.util.UniqueIdGenerator;
import eu.ydp.empiria.player.client.util.events.bus.EventsBus;
import eu.ydp.empiria.player.client.util.events.bus.PlayerEventsBus;
import eu.ydp.gwtutil.client.date.DateService;
import eu.ydp.gwtutil.client.scheduler.Scheduler;
import eu.ydp.gwtutil.client.scheduler.SchedulerMockImpl;
import eu.ydp.gwtutil.client.timer.Timer;
import eu.ydp.gwtutil.client.timer.TimerAccessibleMock;
import eu.ydp.gwtutil.test.AbstractMockingTestModule;
import eu.ydp.gwtutil.test.mock.ReturnsJavaBeanAnswers;

public class TestWithMocksGuiceModule extends AbstractMockingTestModule {

	public TestWithMocksGuiceModule(){
		super();
	}
	
	public TestWithMocksGuiceModule(Class<?>... ignoreClassList) {
		super(ignoreClassList);
	}
	
	public TestWithMocksGuiceModule(Class<?>[] classToOmit, Class<?>[] classToSpy){
		super(classToOmit, classToSpy);
	}
	
	@Override
	public void configure() {
		bindToSingletonOrMockInstance(StyleNameConstants.class);
		bindToSingletonOrMockInstance(ExternalFullscreenVideoConnector.class);
		bindToSingletonOrMockInstance(EventsBus.class, PlayerEventsBus.class);
		bindToSingletonOrMockInstance(MediaConnector.class);
		bindToSingletonOrMockInstance(UniqueIdGenerator.class);
		bindToSingletonOrMockInstance(ExternalMediaEngine.class);
		bindToSingletonOrMockInstance(MediaConnectorListener.class, ExternalMediaEngine.class);
		bindToSingletonOrMockInstance(SingleMediaPlayback.class);
		bindToSingletonOrMockInstance(DateService.class);
		bindToSingletonOrMockInstance(MediaExecutorsStopper.class);
		bindToSingletonOrMockInstance(LabellingView.class);
		bindToSingletonOrMockInstance(LabellingChildView.class);
		bindToSingletonOrMockInstance(LabellingModuleJAXBParserFactory.class);
		
		bindToClassOrMockProvider(IStickieProperties.class, withSettings().defaultAnswer(new ReturnsJavaBeanAnswers()));
		bindToClassOrMockProvider(IStickieView.class);
		bindToClassOrMockProvider(StickiesProcessorExtension.class);
		bindToClassOrMockProvider(IPlayerContainersAccessor.class);
		bindToClassOrMockProvider(CenterPositionFinder.class);
		bindToClassOrMockProvider(RangeCreator.class);
		bindToClassOrMockProvider(WidgetSizeHelper.class);
		bindToClassOrMockProvider(ViewportHelper.class);
		bindToClassOrMockProvider(FullscreenVideoExecutor.class);
		bindToClassOrMockProvider(FullscreenVideoMediaWrapper.class);
		bindToClassOrMockProvider(ExternalFullscreenVideoImpl.class);
		bindToClassOrMockProvider(Scheduler.class, SchedulerMockImpl.class);
		bindToClassOrMockProvider(Timer.class, TimerAccessibleMock.class);
		bindToClassOrMockProvider(SurfacePointTranslator.class);
		bindToClassOrMockProvider(SurfaceDimensionsFinder.class);
		bindToClassOrMockProvider(SurfacePositionFinder.class);
		bindToClassOrMockProvider(SurfaceDimensionsDelegate.class);		
		
		install(new FactoryModuleBuilder()
			.implement(IStickieView.class, StickieView.class)
			.implement(IStickiePresenter.class, StickiePresenter.class)
			.build(StickieFactory.class));	}

}<commit_msg>Fixed broken tests issue YPUB-5232<commit_after>package eu.ydp.empiria.player.client;

import static org.mockito.Mockito.withSettings;

import com.google.inject.assistedinject.FactoryModuleBuilder;

import eu.ydp.empiria.player.client.controller.body.IPlayerContainersAccessor;
import eu.ydp.empiria.player.client.controller.extensions.internal.media.external.ExternalFullscreenVideoConnector;
import eu.ydp.empiria.player.client.controller.extensions.internal.media.external.FullscreenVideoExecutor;
import eu.ydp.empiria.player.client.controller.extensions.internal.sound.MediaExecutorsStopper;
import eu.ydp.empiria.player.client.controller.extensions.internal.sound.SingleMediaPlayback;
import eu.ydp.empiria.player.client.controller.extensions.internal.sound.external.ExternalMediaEngine;
import eu.ydp.empiria.player.client.controller.extensions.internal.sound.external.connector.MediaConnector;
import eu.ydp.empiria.player.client.controller.extensions.internal.sound.external.connector.MediaConnectorListener;
import eu.ydp.empiria.player.client.controller.extensions.internal.stickies.IStickieProperties;
import eu.ydp.empiria.player.client.controller.extensions.internal.stickies.IStickieView;
import eu.ydp.empiria.player.client.controller.extensions.internal.stickies.StickieFactory;
import eu.ydp.empiria.player.client.controller.extensions.internal.stickies.StickieView;
import eu.ydp.empiria.player.client.controller.extensions.internal.stickies.StickiesProcessorExtension;
import eu.ydp.empiria.player.client.controller.extensions.internal.stickies.position.CenterPositionFinder;
import eu.ydp.empiria.player.client.controller.extensions.internal.stickies.position.RangeCreator;
import eu.ydp.empiria.player.client.controller.extensions.internal.stickies.position.ViewportHelper;
import eu.ydp.empiria.player.client.controller.extensions.internal.stickies.position.WidgetSizeHelper;
import eu.ydp.empiria.player.client.controller.extensions.internal.stickies.presenter.IStickiePresenter;
import eu.ydp.empiria.player.client.controller.extensions.internal.stickies.presenter.StickiePresenter;
import eu.ydp.empiria.player.client.gin.factory.PageScopeFactory;
import eu.ydp.empiria.player.client.module.connection.presenter.translation.SurfaceDimensionsDelegate;
import eu.ydp.empiria.player.client.module.connection.presenter.translation.SurfaceDimensionsFinder;
import eu.ydp.empiria.player.client.module.connection.presenter.translation.SurfacePointTranslator;
import eu.ydp.empiria.player.client.module.connection.presenter.translation.SurfacePositionFinder;
import eu.ydp.empiria.player.client.module.labelling.structure.LabellingModuleJAXBParserFactory;
import eu.ydp.empiria.player.client.module.labelling.view.LabellingChildView;
import eu.ydp.empiria.player.client.module.labelling.view.LabellingView;
import eu.ydp.empiria.player.client.module.media.external.FullscreenVideoMediaWrapper;
import eu.ydp.empiria.player.client.module.object.impl.ExternalFullscreenVideoImpl;
import eu.ydp.empiria.player.client.resources.StyleNameConstants;
import eu.ydp.empiria.player.client.util.UniqueIdGenerator;
import eu.ydp.empiria.player.client.util.events.bus.EventsBus;
import eu.ydp.empiria.player.client.util.events.bus.PlayerEventsBus;
import eu.ydp.gwtutil.client.date.DateService;
import eu.ydp.gwtutil.client.scheduler.Scheduler;
import eu.ydp.gwtutil.client.scheduler.SchedulerMockImpl;
import eu.ydp.gwtutil.client.timer.Timer;
import eu.ydp.gwtutil.client.timer.TimerAccessibleMock;
import eu.ydp.gwtutil.test.AbstractMockingTestModule;
import eu.ydp.gwtutil.test.mock.ReturnsJavaBeanAnswers;

public class TestWithMocksGuiceModule extends AbstractMockingTestModule {

	public TestWithMocksGuiceModule(){
		super();
	}
	
	public TestWithMocksGuiceModule(Class<?>... ignoreClassList) {
		super(ignoreClassList);
	}
	
	public TestWithMocksGuiceModule(Class<?>[] classToOmit, Class<?>[] classToSpy){
		super(classToOmit, classToSpy);
	}
	
	@Override
	public void configure() {
		bindToSingletonOrMockInstance(StyleNameConstants.class);
		bindToSingletonOrMockInstance(ExternalFullscreenVideoConnector.class);
		bindToSingletonOrMockInstance(EventsBus.class, PlayerEventsBus.class);
		bindToSingletonOrMockInstance(MediaConnector.class);
		bindToSingletonOrMockInstance(UniqueIdGenerator.class);
		bindToSingletonOrMockInstance(ExternalMediaEngine.class);
		bindToSingletonOrMockInstance(MediaConnectorListener.class, ExternalMediaEngine.class);
		bindToSingletonOrMockInstance(SingleMediaPlayback.class);
		bindToSingletonOrMockInstance(DateService.class);
		bindToSingletonOrMockInstance(MediaExecutorsStopper.class);
		bindToSingletonOrMockInstance(LabellingView.class);
		bindToSingletonOrMockInstance(LabellingChildView.class);
		bindToSingletonOrMockInstance(LabellingModuleJAXBParserFactory.class);
		bindToSingletonOrMockInstance(PageScopeFactory.class);
		
		bindToClassOrMockProvider(IStickieProperties.class, withSettings().defaultAnswer(new ReturnsJavaBeanAnswers()));
		bindToClassOrMockProvider(IStickieView.class);
		bindToClassOrMockProvider(StickiesProcessorExtension.class);
		bindToClassOrMockProvider(IPlayerContainersAccessor.class);
		bindToClassOrMockProvider(CenterPositionFinder.class);
		bindToClassOrMockProvider(RangeCreator.class);
		bindToClassOrMockProvider(WidgetSizeHelper.class);
		bindToClassOrMockProvider(ViewportHelper.class);
		bindToClassOrMockProvider(FullscreenVideoExecutor.class);
		bindToClassOrMockProvider(FullscreenVideoMediaWrapper.class);
		bindToClassOrMockProvider(ExternalFullscreenVideoImpl.class);
		bindToClassOrMockProvider(Scheduler.class, SchedulerMockImpl.class);
		bindToClassOrMockProvider(Timer.class, TimerAccessibleMock.class);
		bindToClassOrMockProvider(SurfacePointTranslator.class);
		bindToClassOrMockProvider(SurfaceDimensionsFinder.class);
		bindToClassOrMockProvider(SurfacePositionFinder.class);
		bindToClassOrMockProvider(SurfaceDimensionsDelegate.class);		
		
		install(new FactoryModuleBuilder()
			.implement(IStickieView.class, StickieView.class)
			.implement(IStickiePresenter.class, StickiePresenter.class)
			.build(StickieFactory.class));	}

}
{'fraction_non_alphanumeric': 0.09636273864384463, 'fraction_numerical': 0.0003291639236339697, 'mean_word_length': 8.355658198614318, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2014158', 'n_tokens_mistral': 3816, 'n_tokens_neox': 3709, 'n_words': 309}