Package net.mindengine.galen.specs.page

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


        List<ObjectSpecs> objects = section.getObjects();
       
        assertThat(objects.size(), is(6));
       
        for (int index = 1; index <=6; index++) {
            ObjectSpecs objectSpecs = objects.get(index - 1);
            assertThat(objectSpecs.getObjectName(), is("box-" + index + "-link"));
            SpecInside spec = (SpecInside) objectSpecs.getSpecs().get(0);
            assertThat(spec.getObject(), is("box-" + index));
        }
    }
View Full Code Here


       
        //[ 1, 3, 6-8, 10]
        int[] indexes = {1, 3, 6, 7, 8, 10};
       
        for (int index = 0; index <6; index++) {
            ObjectSpecs objectSpecs = objects.get(index);
            int number = indexes[index];
            assertThat("Object name #" + index, objectSpecs.getObjectName(), is("box-" + number + "-link"));
            SpecInside spec = (SpecInside) objectSpecs.getSpecs().get(0);
            assertThat(spec.getObject(), is("box-" + number));
        }
    }
View Full Code Here

    @Test(dependsOnMethods = BASE_TEST)
    public void shouldRead_allSpecs_withinFirstSection() {
        List<ObjectSpecs> objects = pageSpec.getSections().get(0).getObjects();
        assertThat(objects.size(), is(1));
       
        ObjectSpecs objectSpecs = objects.get(0);
        assertThat(objectSpecs.getObjectName(), is("menu"));
       
        List<Spec> specs = objectSpecs.getSpecs();
        assertThat(specs.size(), is(2));
       
        assertThat((SpecNear) specs.get(0), is(new SpecNear("button", locations(new Location(Range.exact(10), sides(LEFT))))));
        assertThat((SpecWidth) specs.get(1), is(new SpecWidth(Range.exact(70))));
    }
View Full Code Here

    @Test(dependsOnMethods = BASE_TEST)
    public void shouldRead_allSpecs_withinThirdSection() {
        List<ObjectSpecs> objects = pageSpec.getSections().get(2).getObjects();
        assertThat(objects.size(), is(1));
       
        ObjectSpecs objectSpecs = objects.get(0);
        assertThat(objectSpecs.getObjectName(), is("big-box"));
       
        List<Spec> specs = objectSpecs.getSpecs();
        assertThat(specs.size(), is(1));
       
        assertThat((SpecWidth) specs.get(0), is(new SpecWidth(Range.exact(900))));
    }
View Full Code Here

    @Test(dependsOnMethods = BASE_TEST)
    public void shouldRead_allSpecs_withinFourthSection() {
        List<ObjectSpecs> objects = pageSpec.getSections().get(3).getObjects();
        assertThat(objects.size(), is(1));
       
        ObjectSpecs objectSpecs = objects.get(0);
        assertThat(objectSpecs.getObjectName(), is("submit"));
       
        List<Spec> specs = objectSpecs.getSpecs();
        assertThat(specs.size(), is(1));
       
        assertThat((SpecAbsent) specs.get(0), is(new SpecAbsent()));
    }
View Full Code Here

       
        List<ObjectSpecs> objects = pageSection.getObjects();
        assertThat(objects.size(), is(2));
       
       
        ObjectSpecs headerObject = objects.get(0);
        ObjectSpecs containerObject = objects.get(1);
       
       
        assertThat(headerObject.getSpecs().get(0).getOriginalText(), is("text is: Hi, welcome"));
        assertThat(headerObject.getSpecs().get(1).getOriginalText(), is("inside: screen 10 to 20px top"));
        assertThat(containerObject.getSpecs().get(0).getOriginalText(), is("below: header ~ 10px"));
       
    }
View Full Code Here

       
        ObjectSpecs[] objectSpecs = new ObjectSpecs[parameters.length];
       
        for (int i = 0; i < parameters.length; i++) {
            String objectName = convertParameterizedLine(objectNamePattern, parameters[i]);
            objectSpecs[i] = new ObjectSpecs(objectName);
            section.getObjects().add(objectSpecs[i]);
        }
        currentParameterization = new Parameterization(parameters, objectSpecs);
    }
View Full Code Here

      return parser.parse(line, parameter);
    }

    private void beginNewObject(String line) {
        String name = readObjectNameFromLine(line);
        currentObjectSpecs = new ObjectSpecs(name);
        section.getObjects().add(currentObjectSpecs);
    }
View Full Code Here

TOP

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

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.