Examples of TypeInformation


Examples of org.neo4j.rest.graphdb.converter.TypeInformation

    @Test (expected = RestResultException.class)
    public void testConvertDifferentIterablesWithWrongType(){
        HashSet<String> set = new HashSet<String>();
        set.add("test");
        converter.convertToResultType(set, new TypeInformation(asList(2)));
    }
View Full Code Here

Examples of org.neo4j.rest.graphdb.converter.TypeInformation

    @Test
    public void testConvertDifferentMapsWithSameType(){
        Hashtable<String,String> table = new Hashtable<String,String>();
        table.put("testkey", "testvalue");
        Object result = converter.convertToResultType(table, new TypeInformation(MapUtil.map("test","test")));
        assertEquals(MapUtil.map("testkey","testvalue"), result);
    }
View Full Code Here

Examples of org.neo4j.rest.graphdb.converter.TypeInformation

    @Test (expected = RestResultException.class)
    public void testConvertDifferentMapsWithWrongType(){
        Hashtable<String,String> table = new Hashtable<String,String>();
        table.put("testkey", "testvalue");
        converter.convertToResultType(table, new TypeInformation(MapUtil.map("test",2)));
    }
View Full Code Here

Examples of org.neo4j.rest.graphdb.converter.TypeInformation

        converter.convertToResultType(table, new TypeInformation(MapUtil.map("test",2)));
    }

    @Test
    public void testConvertFromIterableWithSameTypeAndSingleElementToObject(){
        Object result = converter.convertToResultType(Collections.singletonList("test"), new TypeInformation(String.class));
        assertEquals(String.class, result.getClass());
        assertEquals("test", result);
    }
View Full Code Here

Examples of org.neo4j.rest.graphdb.converter.TypeInformation

        assertEquals("test", result);
    }

    @Test (expected = RestResultException.class)
    public void testConvertFromIterableWithWrongTypeToObject(){
        converter.convertToResultType(Collections.singletonList("test"), new TypeInformation(Integer.class));
    }
View Full Code Here

Examples of org.neo4j.rest.graphdb.converter.TypeInformation

        converter.convertToResultType(Collections.singletonList("test"), new TypeInformation(Integer.class));
    }

    @Test (expected = RestResultException.class)
    public void testConvertFromIterableWithSameTypeAndMultipleElementsToObject(){
        converter.convertToResultType(asList("test", "test2"), new TypeInformation(String.class));
    }
View Full Code Here

Examples of org.neo4j.rest.graphdb.converter.TypeInformation

        converter.convertToResultType(asList("test", "test2"), new TypeInformation(String.class));
    }

    @Test
    public void testConvertFromEmptyIterableToObject(){
        Object result = converter.convertToResultType(Collections.emptyList(), new TypeInformation(String.class));
        assertNull(result);
    }
View Full Code Here

Examples of org.neo4j.rest.graphdb.converter.TypeInformation

        assertNull(result);
    }

    @Test
     public void testConvertFromMapWithSameTypeAndSingleElementToObject(){
        Object result = converter.convertToResultType(Collections.singletonMap("test", 2), new TypeInformation(Integer.class));
        assertEquals(Integer.class, result.getClass());
        assertEquals(2, result);
     }
View Full Code Here

Examples of org.neo4j.rest.graphdb.converter.TypeInformation

        assertEquals(2, result);
     }

    @Test
    public void testConvertFromEmptyMapToObject(){
        Object result = converter.convertToResultType(MapUtil.map(), new TypeInformation(String.class));
        assertNull(result);
    }
View Full Code Here

Examples of org.neo4j.rest.graphdb.converter.TypeInformation

        assertNull(result);
    }

    @Test (expected = RestResultException.class)
    public void testConvertFromMapWithWrongTypeToObject(){
       converter.convertToResultType(MapUtil.map("test",2), new TypeInformation(String.class));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.