Refactor to conform to method naming conventions

git-svn-id: http://google-refine.googlecode.com/svn/trunk@2344 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Tom Morris 2011-10-21 16:57:52 +00:00
parent ab950689dd
commit fe7bf1d1f0
7 changed files with 25 additions and 24 deletions

View File

@ -86,16 +86,16 @@ public class ExcelImporterTests extends ImporterTest {
@Override @Override
@BeforeMethod @BeforeMethod
public void SetUp(){ public void setUp(){
super.SetUp(); super.setUp();
SUT = new ExcelImporter(); SUT = new ExcelImporter();
} }
@Override @Override
@AfterMethod @AfterMethod
public void TearDown(){ public void tearDown(){
SUT = null; SUT = null;
super.TearDown(); super.tearDown();
} }
//---------------------read tests------------------------ //---------------------read tests------------------------

View File

@ -33,16 +33,16 @@ public class FixedWidthImporterTests extends ImporterTest {
@Override @Override
@BeforeMethod @BeforeMethod
public void SetUp(){ public void setUp(){
super.SetUp(); super.setUp();
SUT = new FixedWidthImporter(); SUT = new FixedWidthImporter();
} }
@Override @Override
@AfterMethod @AfterMethod
public void TearDown(){ public void tearDown(){
SUT = null; SUT = null;
super.TearDown(); super.tearDown();
} }
//---------------------read tests------------------------ //---------------------read tests------------------------

View File

@ -31,7 +31,7 @@ abstract class ImporterTest extends RefineTest {
protected JSONObject options; protected JSONObject options;
public void SetUp(){ public void setUp(){
//FIXME - should we try and use mock(Project.class); - seems unnecessary complexity //FIXME - should we try and use mock(Project.class); - seems unnecessary complexity
servlet = new RefineServletStub(); servlet = new RefineServletStub();
@ -43,7 +43,7 @@ abstract class ImporterTest extends RefineTest {
options = Mockito.mock(JSONObject.class); options = Mockito.mock(JSONObject.class);
} }
public void TearDown(){ public void tearDown(){
project = null; project = null;
metadata = null; metadata = null;

View File

@ -72,14 +72,14 @@ public class JsonImporterTests extends ImporterTest {
@Override @Override
@BeforeMethod @BeforeMethod
public void SetUp(){ public void setUp(){
super.SetUp(); super.setUp();
SUT = new JsonImporter(); SUT = new JsonImporter();
} }
@Override @Override
@AfterMethod @AfterMethod
public void TearDown() { public void tearDown() {
SUT = null; SUT = null;
if (inputStream != null) { if (inputStream != null) {
try { try {
@ -89,7 +89,7 @@ public class JsonImporterTests extends ImporterTest {
} }
inputStream = null; inputStream = null;
} }
super.TearDown(); super.tearDown();
} }
@Test @Test

View File

@ -58,8 +58,8 @@ public class RdfTripleImporterTests extends ImporterTest {
@Override @Override
@BeforeMethod @BeforeMethod
public void SetUp(){ public void setUp(){
super.SetUp(); super.setUp();
SUT = new RdfTripleImporter(); SUT = new RdfTripleImporter();
JSONUtilities.safePut(options, "base-url", "http://rdf.freebase.com"); JSONUtilities.safePut(options, "base-url", "http://rdf.freebase.com");
} }

View File

@ -65,16 +65,16 @@ public class TsvCsvImporterTests extends ImporterTest {
@Override @Override
@BeforeMethod @BeforeMethod
public void SetUp() { public void setUp() {
super.SetUp(); super.setUp();
SUT = new SeparatorBasedImporter(); SUT = new SeparatorBasedImporter();
} }
@Override @Override
@AfterMethod @AfterMethod
public void TearDown(){ public void tearDown(){
SUT = null; SUT = null;
super.TearDown(); super.tearDown();
} }
@Test(dataProvider = "CSV-TSV-AutoDetermine") @Test(dataProvider = "CSV-TSV-AutoDetermine")

View File

@ -71,14 +71,14 @@ public class XmlImporterTests extends ImporterTest {
@Override @Override
@BeforeMethod @BeforeMethod
public void SetUp(){ public void setUp(){
super.SetUp(); super.setUp();
SUT = new XmlImporter(); SUT = new XmlImporter();
} }
@Override @Override
@AfterMethod @AfterMethod
public void TearDown() { public void tearDown() {
SUT = null; SUT = null;
if (inputStream != null) { if (inputStream != null) {
try { try {
@ -88,7 +88,7 @@ public class XmlImporterTests extends ImporterTest {
} }
inputStream = null; inputStream = null;
} }
super.TearDown(); super.tearDown();
} }
@Test @Test
@ -351,6 +351,7 @@ public class XmlImporterTests extends ImporterTest {
} }
} }
@Override
protected void parseOneFile(TreeImportingParserBase parser, InputStream inputStream, JSONObject options) { protected void parseOneFile(TreeImportingParserBase parser, InputStream inputStream, JSONObject options) {
parseOneInputStream(parser, inputStream, options); parseOneInputStream(parser, inputStream, options);
} }