Package org.drools.ide.common.client.modeldriven.testing

Examples of org.drools.ide.common.client.modeldriven.testing.CollectionFieldData


    private Field createField(SelectionEvent<Integer> selectionEvent) {
        if (selectionEvent.getSelectedItem() == FieldData.TYPE_FACT) {
            return new FactAssignmentField(field.getName(), helper.getFieldType());
        } else {
            if (selectionEvent.getSelectedItem() == FieldData.TYPE_COLLECTION) {
                CollectionFieldData collectionFieldData = new CollectionFieldData();
                collectionFieldData.setName(field.getName());
                return collectionFieldData;
            } else {
                FieldData fieldData = new FieldData(field.getName(), "");
                fieldData.setNature(selectionEvent.getSelectedItem());
                return fieldData;
View Full Code Here


    private Field createField(SelectionEvent<Integer> selectionEvent) {
        if (selectionEvent.getSelectedItem() == FieldData.TYPE_FACT) {
            return new FactAssignmentField(field.getName(), helper.getFieldType());
        } else {
            if (selectionEvent.getSelectedItem() == FieldData.TYPE_COLLECTION) {
                CollectionFieldData collectionFieldData = new CollectionFieldData();
                collectionFieldData.setName(field.getName());
                return collectionFieldData;
            } else {
                FieldData fieldData = new FieldData(field.getName(), "");
                fieldData.setNature(selectionEvent.getSelectedItem());
                return fieldData;
View Full Code Here

    @Test
    public void testCollection() throws Exception {
        TypeResolver typeResolver = getTypeResolver();

        List<Field> fieldData = new ArrayList<Field>();
        CollectionFieldData collectionFieldData = new CollectionFieldData();
        collectionFieldData.setName("cheeses");
        fieldData.add(collectionFieldData);
        collectionFieldData.getCollectionFieldList().add(new FieldData("cheeses", "=cheese1"));
        collectionFieldData.getCollectionFieldList().add(new FieldData("cheeses", "=cheese2"));

        FactData cheeseryFactData = new FactData(
                "Cheesery",
                "cheesery",
                fieldData,
View Full Code Here

    @Test
    public void testCollectionSums() throws Exception {
        TypeResolver typeResolver = getTypeResolver();

        List<Field> fieldData = new ArrayList<Field>();
        CollectionFieldData collectionFieldData = new CollectionFieldData();
        collectionFieldData.setName("list");
        fieldData.add(collectionFieldData);
        collectionFieldData.getCollectionFieldList().add(new FieldData("list", "=1+3"));

        FactData wrapperFactData = new FactData(
                "MyCollectionWrapper",
                "wrapper",
                fieldData,
View Full Code Here

TOP

Related Classes of org.drools.ide.common.client.modeldriven.testing.CollectionFieldData

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.