From 7a1bf5d3263f8f008850fad3fc672af77ecd6219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Labr=C3=A8che?= Date: Sun, 29 Oct 2017 18:40:40 +0100 Subject: [PATCH] #8: Refactored method name 'write' to 'save' for Table class. --- src/main/java/io/frictionlessdata/tableschema/Table.java | 2 +- src/test/java/io/frictionlessdata/tableschema/TableTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/frictionlessdata/tableschema/Table.java b/src/main/java/io/frictionlessdata/tableschema/Table.java index 2b961017..c454b60f 100644 --- a/src/main/java/io/frictionlessdata/tableschema/Table.java +++ b/src/main/java/io/frictionlessdata/tableschema/Table.java @@ -74,7 +74,7 @@ public String[] getHeaders(){ return this.dataSource.getHeaders(); } - public void write(String outputFilePath) throws Exception{ + public void save(String outputFilePath) throws Exception{ this.dataSource.write(outputFilePath); } public List read(boolean cast) throws Exception{ diff --git a/src/test/java/io/frictionlessdata/tableschema/TableTest.java b/src/test/java/io/frictionlessdata/tableschema/TableTest.java index 1f7289fd..1cc4d142 100644 --- a/src/test/java/io/frictionlessdata/tableschema/TableTest.java +++ b/src/test/java/io/frictionlessdata/tableschema/TableTest.java @@ -298,12 +298,12 @@ public void testReadCastData() throws Exception{ } @Test - public void writeTable() throws Exception{ + public void saveTable() throws Exception{ File createdFile = folder.newFile("test_data_table.csv"); String sourceFileAbsPath = TableTest.class.getResource("/fixtures/simple_data.csv").getPath(); Table loadedTable = new Table(sourceFileAbsPath); - loadedTable.write(createdFile.getAbsolutePath()); + loadedTable.save(createdFile.getAbsolutePath()); Table readTable = new Table(createdFile.getAbsolutePath()); Assert.assertEquals(loadedTable.getHeaders()[0], "id");