Package net.mindengine.galen.specs.page

Examples of net.mindengine.galen.specs.page.ConditionalBlockStatement


        assertThat(blocks.size(), is(1));
       
        ConditionalBlock block = blocks.get(0);
        List<ConditionalBlockStatement> statements = block.getStatements();
        assertThat(statements.size(), is(1));
        ConditionalBlockStatement statement = statements.get(0);
        assertThat(statement.isInverted(), is(false));
       
        List<ObjectSpecs> statementObjects = statement.getObjects();
        assertThat(statementObjects.size(), is(2));
        assertThat(statementObjects.get(0).getObjectName(), is("button-1"));
        assertThat(statementObjects.get(0).getSpecs().get(0).getOriginalText(), is("width: > 100px"));
        assertThat(statementObjects.get(1).getObjectName(), is("button-2"));
        assertThat(statementObjects.get(1).getSpecs().get(0).getOriginalText(), is("height: < 50px"));
View Full Code Here


        ConditionalBlock block = blocks.get(0);
        List<ConditionalBlockStatement> statements = block.getStatements();
        assertThat(statements.size(), is(3));
       
        {
            ConditionalBlockStatement statement = statements.get(0);
            assertThat(statement.isInverted(), is(false));
            List<ObjectSpecs> statementObjects = statement.getObjects();
            assertThat(statementObjects.size(), is(1));
            assertThat(statementObjects.get(0).getObjectName(), is("button-1"));
            assertThat(statementObjects.get(0).getSpecs().get(0).getOriginalText(), is("width: > 100px"));
        }
        {
            ConditionalBlockStatement statement = statements.get(1);
            assertThat(statement.isInverted(), is(false));
            List<ObjectSpecs> statementObjects = statement.getObjects();
            assertThat(statementObjects.size(), is(1));
            assertThat(statementObjects.get(0).getObjectName(), is("button-2"));
            assertThat(statementObjects.get(0).getSpecs().get(0).getOriginalText(), is("width: 200px"));
        }
        {
            ConditionalBlockStatement statement = statements.get(2);
            assertThat(statement.isInverted(), is(false));
            List<ObjectSpecs> statementObjects = statement.getObjects();
            assertThat(statementObjects.size(), is(1));
            assertThat(statementObjects.get(0).getObjectName(), is("button-3"));
            assertThat(statementObjects.get(0).getSpecs().get(0).getOriginalText(), is("width: 200px"));
        }
       
View Full Code Here

        ConditionalBlock block = blocks.get(0);
        List<ConditionalBlockStatement> statements = block.getStatements();
        assertThat(statements.size(), is(2));
       
        {
            ConditionalBlockStatement statement = statements.get(0);
            assertThat(statement.isInverted(), is(true));
            List<ObjectSpecs> statementObjects = statement.getObjects();
            assertThat(statementObjects.size(), is(1));
            assertThat(statementObjects.get(0).getObjectName(), is("button-1"));
            assertThat(statementObjects.get(0).getSpecs().get(0).getOriginalText(), is("width: > 100px"));
        }
        {
            ConditionalBlockStatement statement = statements.get(1);
            assertThat(statement.isInverted(), is(true));
            List<ObjectSpecs> statementObjects = statement.getObjects();
            assertThat(statementObjects.size(), is(1));
            assertThat(statementObjects.get(0).getObjectName(), is("button-2"));
            assertThat(statementObjects.get(0).getSpecs().get(0).getOriginalText(), is("width: 200px"));
        }
       
View Full Code Here

        ConditionalBlock block = blocks.get(0);
        List<ConditionalBlockStatement> statements = block.getStatements();
        assertThat(statements.size(), is(1));
       
        {
            ConditionalBlockStatement statement = statements.get(0);
            assertThat(statement.isInverted(), is(false));
            List<ObjectSpecs> statementObjects = statement.getObjects();
            assertThat(statementObjects.size(), is(1));
            assertThat(statementObjects.get(0).getObjectName(), is("button-1"));
            assertThat(statementObjects.get(0).getSpecs().get(0).getOriginalText(), is("width: > 100px"));
        }
       
View Full Code Here

    public void startNewStatement(boolean inverted) {
        if (state != STATE.STATEMENT) {
            throw new SyntaxException("Wrong place for this statement");
        }
       
        ConditionalBlockStatement currentStatement = new ConditionalBlockStatement();
        currentStatement.setInverted(inverted);
        conditionalBlock.getStatements().add(currentStatement);
       
        PageSection currentSection = new PageSection();
        currentSectionState = new StateDoingSection(getProperties(), currentSection, getContextPath(), getPageSpecReader());
       
        currentStatement.setObjects(currentSection.getObjects());
    }
View Full Code Here

TOP

Related Classes of net.mindengine.galen.specs.page.ConditionalBlockStatement

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.