Package com.google.refine.model

Examples of com.google.refine.model.Row.save()


    @Test
    public void saveRow() {
        Row row = new Row(5);
        row.setCell(0, new Cell("I'm not empty", null));
        row.save(writer, options);
        Assert.assertEquals(writer.getBuffer().toString(),
                "{\"flagged\":false,\"starred\":false,\"cells\":[{\"v\":\"I'm not empty\"}]}");
    }

    @Test
View Full Code Here


        row.setCell(0, new Cell("I'm not empty", null));
        when(options.containsKey("rowIndex")).thenReturn(true);
        when(options.get("rowIndex")).thenReturn(0);
        when(options.containsKey("recordIndex")).thenReturn(true);
        when(options.get("recordIndex")).thenReturn(1);
        row.save(writer, options);
        Assert.assertEquals(
                writer.getBuffer().toString(),
                "{\"flagged\":false,\"starred\":false,\"cells\":[{\"v\":\"I'm not empty\"}],\"i\":0,\"j\":1}");
    }
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.