Search in sources :

Example 1 with ConditionedInterceptor

use of com.github.noraui.cucumber.interceptor.ConditionedInterceptor in project NoraUi by NoraUi.

the class NoraUiModule method configure.

/**
 * {@inheritDoc}
 */
@Override
public void configure(Binder binder) {
    logger.debug("NORAUI NoraUiModule configure");
    binder.bindInterceptor(any(), annotatedWith(Conditioned.class), new ConditionedInterceptor());
    binder.bindInterceptor(Matchers.subclassesOf(com.github.noraui.application.steps.Step.class).or(Matchers.subclassesOf(BrowserSteps.class)), any(), new StepInterceptor());
    logger.debug("NORAUI service binding");
    binder.bind(ScreenService.class).to(ScreenServiceImpl.class).asEagerSingleton();
    binder.bind(UserNameService.class).to(UserNameServiceImpl.class).asEagerSingleton();
}
Also used : ConditionedInterceptor(com.github.noraui.cucumber.interceptor.ConditionedInterceptor) UserNameServiceImpl(com.github.noraui.service.impl.UserNameServiceImpl) ScreenServiceImpl(com.github.noraui.service.impl.ScreenServiceImpl) Conditioned(com.github.noraui.cucumber.annotation.Conditioned) StepInterceptor(com.github.noraui.cucumber.interceptor.StepInterceptor)

Example 2 with ConditionedInterceptor

use of com.github.noraui.cucumber.interceptor.ConditionedInterceptor in project NoraUi by NoraUi.

the class StepUT method setUp.

@Before
public void setUp() {
    step = new Step();
    ci = new ConditionedInterceptor();
    gherkinCondition = new GherkinStepCondition();
    conditions = new ArrayList<>();
    NoraUiInjector.resetInjector();
    new NoraUiInjectorSource().getInjector();
}
Also used : ConditionedInterceptor(com.github.noraui.cucumber.interceptor.ConditionedInterceptor) GherkinConditionedLoopedStep(com.github.noraui.gherkin.GherkinConditionedLoopedStep) GherkinStepCondition(com.github.noraui.gherkin.GherkinStepCondition) NoraUiInjectorSource(com.github.noraui.cucumber.injector.NoraUiInjectorSource) Before(org.junit.Before)

Aggregations

ConditionedInterceptor (com.github.noraui.cucumber.interceptor.ConditionedInterceptor)2 Conditioned (com.github.noraui.cucumber.annotation.Conditioned)1 NoraUiInjectorSource (com.github.noraui.cucumber.injector.NoraUiInjectorSource)1 StepInterceptor (com.github.noraui.cucumber.interceptor.StepInterceptor)1 GherkinConditionedLoopedStep (com.github.noraui.gherkin.GherkinConditionedLoopedStep)1 GherkinStepCondition (com.github.noraui.gherkin.GherkinStepCondition)1 ScreenServiceImpl (com.github.noraui.service.impl.ScreenServiceImpl)1 UserNameServiceImpl (com.github.noraui.service.impl.UserNameServiceImpl)1 Before (org.junit.Before)1