Package org.lilyproject.repository.impl.valuetype

Examples of org.lilyproject.repository.impl.valuetype.StringValueType


        assertEquals(qname, converter.convert(avroQName));
    }

    @Test
    public void testValueType() throws Exception {
        ValueType valueType = new StringValueType();
        typeManager.getValueType("STRING");
        expectLastCall().andReturn(valueType);

        control.replay();
        converter = new AvroConverter();
View Full Code Here


        control.verify();
    }

    @Test
    public void testFieldType() throws Exception {
        ValueType valueType = new StringValueType();
        typeManager.getValueType("STRING");
        expectLastCall().andReturn(valueType);
        QName name = new QName("aNamespace", "aName");
        SchemaId fieldTypeId = new SchemaIdImpl(UUID.randomUUID());
        FieldType fieldType = new FieldTypeImpl(fieldTypeId, valueType, name, Scope.NON_VERSIONED);
View Full Code Here

        control.verify();
    }

    @Test
    public void testFieldTypeWithoutId() throws Exception {
        ValueType valueType = new StringValueType();
        typeManager.getValueType("LIST<STRING>");
        expectLastCall().andReturn(valueType);
        QName name = new QName("aNamespace", "aName");
        FieldType fieldType = new FieldTypeImpl(null, valueType, name, Scope.NON_VERSIONED);
        typeManager.newFieldType(valueType, name, Scope.NON_VERSIONED);
View Full Code Here

    @Test
    public void testRecord() throws Exception {
        converter = new AvroConverter();
        FieldType fieldType = control.createMock(FieldType.class);
        FieldTypes fieldTypesSnapshot = control.createMock(FieldTypes.class);
        ValueType valueType = new StringValueType();
        IdGenerator idGenerator = new IdGeneratorImpl();

        recordFactory.newRecord();
        expectLastCall().andReturn(new RecordImpl()).anyTimes();
        repository.getIdGenerator();
View Full Code Here

import static org.mockito.Mockito.when;

public class HierarchicalFacetPrefixFormatterTest {
    @Test
    public void testSingValue() throws Exception {
        ValueType valueType = new StringValueType();
        FieldType fieldType = mock(FieldType.class);
        when(fieldType.getValueType()).thenReturn(valueType);

        HierarchicalFacetPrefixFormatter formatter = new HierarchicalFacetPrefixFormatter();
        IndexValue value = new IndexValue(null, fieldType, "foo/bar");
View Full Code Here

    }

    @Test
    public void testMultiValue() throws Exception {
        TypeManager typeManager = mock(TypeManager.class);
        when(typeManager.getValueType("STRING")).thenReturn(new StringValueType());

        ValueType valueType = new ListValueType(typeManager, "STRING");
        FieldType fieldType = mock(FieldType.class);
        when(fieldType.getValueType()).thenReturn(valueType);
View Full Code Here

TOP

Related Classes of org.lilyproject.repository.impl.valuetype.StringValueType

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.