Package ar.com.dgarcia.javaspec.impl.model

Examples of ar.com.dgarcia.javaspec.impl.model.TestContextDefinition


    public void variableDefinedInGroupShouldHaveDefinition(){
        SpecTree readSpec = parser.parse(VariableInSuitSpecTest.class);

        SpecGroup onlyGroup = readSpec.getRootGroup().getSubGroups().get(0);

        TestContextDefinition contextDefinition = onlyGroup.getTestContext();
        assertThat(contextDefinition.getDefinitionFor("foo")).isNotNull();
    }
View Full Code Here


    public void variableDefinedInGroupShouldHaveDefinition(){
        SpecTree readSpec = parser.parse(VariableInSuitSpec.class);

        SpecGroup onlyGroup = readSpec.getRootGroup().getSubGroups().get(0);

        TestContextDefinition contextDefinition = onlyGroup.getTestContext();
        assertThat(contextDefinition.getDefinitionFor("foo")).isNotNull();
    }
View Full Code Here

        }
    }

    @Test
    public void itUsesTheDefinitionOfParentContext(){
        TestContextDefinition parentContext = MappedContext.create();
        testContext.setParentDefinition(parentContext);

        parentContext.let("foo", ()-> 2);

        assertThat(testContext.<Integer>get("foo")).isEqualTo(2);
    }
View Full Code Here

TOP

Related Classes of ar.com.dgarcia.javaspec.impl.model.TestContextDefinition

Copyright © 2018 www.massapicom. 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.