From b331e15152f54fceaed207433d6c1088f790fdbf Mon Sep 17 00:00:00 2001 From: richie Date: Wed, 4 Sep 2019 09:58:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/data/open/BaseTableDataTest.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/test/java/com/fanruan/api/data/open/BaseTableDataTest.java b/src/test/java/com/fanruan/api/data/open/BaseTableDataTest.java index 978179b..9d2891a 100644 --- a/src/test/java/com/fanruan/api/data/open/BaseTableDataTest.java +++ b/src/test/java/com/fanruan/api/data/open/BaseTableDataTest.java @@ -1,7 +1,6 @@ package com.fanruan.api.data.open; import com.fr.general.data.DataModel; -import com.fr.general.data.TableDataException; import com.fr.measure.metric.DBMetric; import com.fr.script.Calculator; import org.junit.Assert; @@ -21,7 +20,7 @@ public class BaseTableDataTest { Calculator calculator = Calculator.createCalculator(); DemoTableData tableData = new DemoTableData(); DataModel model = tableData.createDataModel(calculator); - Object r = model.getValueAt(0, 0); + Object r = model.getValueAt(0, 0); Assert.assertEquals("abc", r); } @@ -32,37 +31,37 @@ public class BaseTableDataTest { public DataModel createDataModel(Calculator calculator) { return new DataModel() { @Override - public int getColumnCount() throws TableDataException { + public int getColumnCount() { return 1; } @Override - public int getColumnIndex(String s) throws TableDataException { + public int getColumnIndex(String s) { return 1; } @Override - public String getColumnName(int i) throws TableDataException { + public String getColumnName(int i) { return "test"; } @Override - public boolean hasRow(int i) throws TableDataException { + public boolean hasRow(int i) { return i < 1; } @Override - public int getRowCount() throws TableDataException { + public int getRowCount() { return 1; } @Override - public Object getValueAt(int i, int i1) throws TableDataException { + public Object getValueAt(int i, int i1) { return "abc"; } @Override - public void release() throws Exception { + public void release() { }