Package org.mongolink.utils

Examples of org.mongolink.utils.FieldContainer


        assertThat(dbObject.getString("value"), Matchers.is("value"));
    }

    private PropertyMapper propertyMapperFromField() throws  NoSuchFieldException {
        Field field = Fields.find(FakeAggregate.class, "value");
        final PropertyMapper result = new PropertyMapper(new FieldContainer(field));
        result.setMapper(parentMapper());
        return result;
    }
View Full Code Here


        mapping.buildMapper(context);
        final ClassMapper classMapper = mock(ClassMapper.class);
        when(classMapper.getContext()).thenReturn(context);
        when(classMapper.getPersistentType()).thenReturn(FakeAggregate.class);
        final Method method = FakeAggregate.class.getMethod("getComment", null);
        FieldContainer fieldContainer = new FieldContainer(method);
        PropertyMapper propertyComponentMapper = new PropertyMapper(fieldContainer);
        propertyComponentMapper.setMapper(classMapper);
        return propertyComponentMapper;
    }
View Full Code Here

        dbObject.put("list", objects);
        return dbObject;
    }

    private CollectionMapper createMapper() throws NoSuchMethodException {
        final CollectionMapper result = new CollectionMapper(new FieldContainer(EntityWithCollection.class.getMethod("getList", null)));
        final MapperContext context = new MapperContext();
        final ClassMapper classMapper = mock(ClassMapper.class);
        when(classMapper.getContext()).thenReturn(context);
        result.setMapper(classMapper);
        return result;
View Full Code Here

TOP

Related Classes of org.mongolink.utils.FieldContainer

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.