Package com.basho.riak.client.api.convert

Examples of com.basho.riak.client.api.convert.StringConverter


    @Test
    public void producesRiakObject()
    {
        String foo = "some value";
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, "bucket");
        StringConverter converter = new StringConverter();
       
       
        Converter.OrmExtracted orm = converter.fromDomain(foo, ns, BinaryValue.create("key"));
       
        assertNotNull(orm.getRiakObject());
        RiakObject obj = orm.getRiakObject();
        assertEquals(foo, obj.getValue().toString());
        assertEquals("text/plain", obj.getContentType());
View Full Code Here


    public void producesString()
    {
        String value = "some value";
        RiakObject obj = new RiakObject()
                        .setValue(BinaryValue.create(value));
        StringConverter converter = new StringConverter();
       
        String result = converter.toDomain(obj, null);
       
        assertEquals(value, result);
       
                       
    }
View Full Code Here

TOP

Related Classes of com.basho.riak.client.api.convert.StringConverter

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.