Package cuke4duke.internal.jvmclass

Examples of cuke4duke.internal.jvmclass.ClassLanguage.begin_scenario()


    @Test
    public void shouldAllowOneInheritedSubclass() throws Throwable {
        ClassLanguage classLanguage = new ClassLanguage(languageMixin, mock(ExceptionFactory.class), stepMother, Arrays.<ClassAnalyzer>asList(new JavaAnalyzer()));
        classLanguage.addClass(FlintStone.class);
        classLanguage.addClass(Fred.class);
        classLanguage.begin_scenario(null);
        List<StepDefinition> stepDefinitions = classLanguage.getStepDefinitions();
        assertEquals(1, stepDefinitions.size());

        assertEquals(Fred.class, ((AbstractStepDefinition)stepDefinitions.get(0)).invokeWithArgs(new Object[0]));
    }
View Full Code Here


    public void shouldFailWithTwoInheritedSubclass() throws Throwable {
        ClassLanguage classLanguage = new ClassLanguage(languageMixin, mock(ExceptionFactory.class), stepMother, Arrays.<ClassAnalyzer>asList(new JavaAnalyzer()));
        classLanguage.addClass(FlintStone.class);
        classLanguage.addClass(Fred.class);
        classLanguage.addClass(Wilma.class);
        classLanguage.begin_scenario(null);
        List<StepDefinition> stepDefinitions = classLanguage.getStepDefinitions();
        assertEquals(1, stepDefinitions.size());

        assertEquals(Fred.class, ((AbstractStepDefinition)stepDefinitions.get(0)).invokeWithArgs(new Object[0]));
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.