From 29f3cef3ecdca390a2ca21da2a4d918fc07c7b23 Mon Sep 17 00:00:00 2001 From: Antonin Delpeuch Date: Fri, 23 Aug 2019 14:09:11 +0100 Subject: [PATCH] Remove uses of junit, closes #2133 --- .../wikidata/commands/LoginCommandTest.java | 2 +- .../PreviewWikibaseSchemaCommandTest.java | 2 +- .../SaveWikibaseSchemaCommandTest.java | 2 +- .../wikidata/commands/SchemaCommandTest.java | 2 +- .../editing/EditBatchProcessorTest.java | 2 +- .../wikidata/editing/NewItemLibraryTest.java | 2 +- .../editing/ReconEntityRewriterTest.java | 2 +- .../wikidata/exporters/QSValuePrinterTest.java | 2 +- .../exporters/QuickStatementsExporterTest.java | 2 +- .../PerformWikibaseEditsOperationTest.java | 2 +- .../SaveWikibaseSchemaOperationTest.java | 4 ++-- .../wikidata/qa/QAWarningStoreTest.java | 2 +- .../openrefine/wikidata/qa/QAWarningTest.java | 2 +- .../qa/scrutinizers/ScrutinizerTest.java | 4 ++-- .../wikidata/schema/ExpressionContextTest.java | 4 ++-- .../schema/WbLanguageConstantTest.java | 4 ++-- .../schema/WbLocationConstantTest.java | 2 +- .../wikidata/schema/WbNameDescExprTest.java | 2 +- .../wikidata/schema/WbQuantityExprTest.java | 2 +- .../wikidata/schema/WbStatementExprTest.java | 2 +- .../wikidata/schema/WikibaseSchemaTest.java | 2 +- .../entityvalues/ReconEntityIdValueTest.java | 8 ++++---- .../testing/JacksonSerializationTest.java | 2 +- .../wikidata/updates/ItemUpdateTest.java | 8 ++++---- .../scheduler/PointerExtractorTest.java | 2 +- .../QuickStatementsUpdateSchedulerTest.java | 2 +- .../updates/scheduler/UpdateSchedulerTest.java | 2 +- .../WikibaseAPIUpdateSchedulerTest.java | 2 +- main/pom.xml | 18 ------------------ .../refine/exporters/sql/SqlExporterTests.java | 2 +- .../functions/strings/SmartSplitTests.java | 13 ++++++------- .../expr/util/JsonValueConverterTests.java | 2 -- .../src/com/google/refine/model/CellTests.java | 2 +- .../model/changes/DataExtensionChangeTest.java | 2 +- .../recon/ReconJudgeSimilarCellsTests.java | 4 ++-- .../src/com/google/refine/util/TestUtils.java | 8 +++----- 36 files changed, 52 insertions(+), 75 deletions(-) diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/commands/LoginCommandTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/commands/LoginCommandTest.java index 8699ef3a4..36ca6c4bd 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/commands/LoginCommandTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/commands/LoginCommandTest.java @@ -1,6 +1,6 @@ package org.openrefine.wikidata.commands; -import static org.junit.Assert.assertEquals; +import static org.testng.Assert.assertEquals; import java.io.IOException; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/commands/PreviewWikibaseSchemaCommandTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/commands/PreviewWikibaseSchemaCommandTest.java index 483b9519a..fc0d0d664 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/commands/PreviewWikibaseSchemaCommandTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/commands/PreviewWikibaseSchemaCommandTest.java @@ -23,7 +23,7 @@ ******************************************************************************/ package org.openrefine.wikidata.commands; -import static org.junit.Assert.assertEquals; +import static org.testng.Assert.assertEquals; import static org.mockito.Mockito.when; import static org.openrefine.wikidata.testing.TestingData.jsonFromFile; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/commands/SaveWikibaseSchemaCommandTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/commands/SaveWikibaseSchemaCommandTest.java index 365bb1796..cd981382b 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/commands/SaveWikibaseSchemaCommandTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/commands/SaveWikibaseSchemaCommandTest.java @@ -23,7 +23,7 @@ ******************************************************************************/ package org.openrefine.wikidata.commands; -import static org.junit.Assert.assertTrue; +import static org.testng.Assert.assertTrue; import static org.mockito.Mockito.when; import static org.openrefine.wikidata.testing.TestingData.jsonFromFile; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/commands/SchemaCommandTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/commands/SchemaCommandTest.java index 84e541d00..8af1528cd 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/commands/SchemaCommandTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/commands/SchemaCommandTest.java @@ -23,7 +23,7 @@ ******************************************************************************/ package org.openrefine.wikidata.commands; -import static org.junit.Assert.assertEquals; +import static org.testng.Assert.assertEquals; import static org.mockito.Mockito.when; import java.io.IOException; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/editing/EditBatchProcessorTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/editing/EditBatchProcessorTest.java index a54f06517..5bcaf5a87 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/editing/EditBatchProcessorTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/editing/EditBatchProcessorTest.java @@ -23,7 +23,7 @@ ******************************************************************************/ package org.openrefine.wikidata.editing; -import static org.junit.Assert.assertEquals; +import static org.testng.Assert.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/editing/NewItemLibraryTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/editing/NewItemLibraryTest.java index ddffdaf2d..7cb9d8222 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/editing/NewItemLibraryTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/editing/NewItemLibraryTest.java @@ -23,7 +23,7 @@ ******************************************************************************/ package org.openrefine.wikidata.editing; -import static org.junit.Assert.assertEquals; +import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; import java.util.Collections; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/editing/ReconEntityRewriterTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/editing/ReconEntityRewriterTest.java index 1b1e90266..66c8956eb 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/editing/ReconEntityRewriterTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/editing/ReconEntityRewriterTest.java @@ -23,7 +23,7 @@ ******************************************************************************/ package org.openrefine.wikidata.editing; -import static org.junit.Assert.assertEquals; +import static org.testng.Assert.assertEquals; import org.openrefine.wikidata.testing.TestingData; import org.openrefine.wikidata.updates.ItemUpdate; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/exporters/QSValuePrinterTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/exporters/QSValuePrinterTest.java index 77fd15136..8612391f2 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/exporters/QSValuePrinterTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/exporters/QSValuePrinterTest.java @@ -23,7 +23,7 @@ ******************************************************************************/ package org.openrefine.wikidata.exporters; -import static org.junit.Assert.assertEquals; +import static org.testng.Assert.assertEquals; import java.math.BigDecimal; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/exporters/QuickStatementsExporterTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/exporters/QuickStatementsExporterTest.java index f67fe78c1..0b4968327 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/exporters/QuickStatementsExporterTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/exporters/QuickStatementsExporterTest.java @@ -23,7 +23,7 @@ ******************************************************************************/ package org.openrefine.wikidata.exporters; -import static org.junit.Assert.assertEquals; +import static org.testng.Assert.assertEquals; import java.io.IOException; import java.io.StringWriter; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/operations/PerformWikibaseEditsOperationTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/operations/PerformWikibaseEditsOperationTest.java index 7a0e10ab0..c66851fa7 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/operations/PerformWikibaseEditsOperationTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/operations/PerformWikibaseEditsOperationTest.java @@ -23,7 +23,7 @@ ******************************************************************************/ package org.openrefine.wikidata.operations; -import static org.junit.Assert.assertEquals; +import static org.testng.Assert.assertEquals; import java.io.LineNumberReader; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/operations/SaveWikibaseSchemaOperationTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/operations/SaveWikibaseSchemaOperationTest.java index 8008cb282..13a291c28 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/operations/SaveWikibaseSchemaOperationTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/operations/SaveWikibaseSchemaOperationTest.java @@ -23,8 +23,8 @@ ******************************************************************************/ package org.openrefine.wikidata.operations; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNull; import java.io.LineNumberReader; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/qa/QAWarningStoreTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/qa/QAWarningStoreTest.java index 39388e539..9306ca3f6 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/qa/QAWarningStoreTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/qa/QAWarningStoreTest.java @@ -23,7 +23,7 @@ ******************************************************************************/ package org.openrefine.wikidata.qa; -import static org.junit.Assert.assertEquals; +import static org.testng.Assert.assertEquals; import org.openrefine.wikidata.testing.JacksonSerializationTest; import org.testng.annotations.BeforeMethod; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/qa/QAWarningTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/qa/QAWarningTest.java index eaa12e24c..4ab900164 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/qa/QAWarningTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/qa/QAWarningTest.java @@ -23,7 +23,7 @@ ******************************************************************************/ package org.openrefine.wikidata.qa; -import static org.junit.Assert.assertEquals; +import static org.testng.Assert.assertEquals; import org.openrefine.wikidata.testing.JacksonSerializationTest; import org.testng.annotations.Test; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/qa/scrutinizers/ScrutinizerTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/qa/scrutinizers/ScrutinizerTest.java index 2978bd02c..346ffadd5 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/qa/scrutinizers/ScrutinizerTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/qa/scrutinizers/ScrutinizerTest.java @@ -23,8 +23,8 @@ ******************************************************************************/ package org.openrefine.wikidata.qa.scrutinizers; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; import java.util.Arrays; import java.util.Set; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/ExpressionContextTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/ExpressionContextTest.java index ca3aee500..98486812b 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/ExpressionContextTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/ExpressionContextTest.java @@ -23,8 +23,8 @@ ******************************************************************************/ package org.openrefine.wikidata.schema; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNull; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbLanguageConstantTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbLanguageConstantTest.java index 7248bbb31..07071c352 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbLanguageConstantTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbLanguageConstantTest.java @@ -23,8 +23,8 @@ ******************************************************************************/ package org.openrefine.wikidata.schema; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNull; import org.openrefine.wikidata.testing.JacksonSerializationTest; import org.testng.annotations.Test; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbLocationConstantTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbLocationConstantTest.java index a53b8b9e3..640e1a95e 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbLocationConstantTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbLocationConstantTest.java @@ -23,7 +23,7 @@ ******************************************************************************/ package org.openrefine.wikidata.schema; -import static org.junit.Assert.assertEquals; +import static org.testng.Assert.assertEquals; import java.text.ParseException; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbNameDescExprTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbNameDescExprTest.java index ef72d5c6e..51ed2ab27 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbNameDescExprTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbNameDescExprTest.java @@ -23,7 +23,7 @@ ******************************************************************************/ package org.openrefine.wikidata.schema; -import static org.junit.Assert.assertEquals; +import static org.testng.Assert.assertEquals; import java.util.Collections; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbQuantityExprTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbQuantityExprTest.java index 97676504c..ae7ca5d37 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbQuantityExprTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbQuantityExprTest.java @@ -23,7 +23,7 @@ ******************************************************************************/ package org.openrefine.wikidata.schema; -import static org.junit.Assert.assertEquals; +import static org.testng.Assert.assertEquals; import java.math.BigDecimal; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbStatementExprTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbStatementExprTest.java index 7f9a1491c..17ee758b5 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbStatementExprTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WbStatementExprTest.java @@ -23,7 +23,7 @@ ******************************************************************************/ package org.openrefine.wikidata.schema; -import static org.junit.Assert.assertEquals; +import static org.testng.Assert.assertEquals; import java.io.IOException; import java.util.Arrays; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WikibaseSchemaTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WikibaseSchemaTest.java index 00f6512bc..f5965c338 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WikibaseSchemaTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/WikibaseSchemaTest.java @@ -23,7 +23,7 @@ ******************************************************************************/ package org.openrefine.wikidata.schema; -import static org.junit.Assert.assertEquals; +import static org.testng.Assert.assertEquals; import java.io.IOException; import java.util.ArrayList; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/entityvalues/ReconEntityIdValueTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/entityvalues/ReconEntityIdValueTest.java index d8cfddad6..f0805c423 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/entityvalues/ReconEntityIdValueTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/schema/entityvalues/ReconEntityIdValueTest.java @@ -23,10 +23,10 @@ ******************************************************************************/ package org.openrefine.wikidata.schema.entityvalues; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertTrue; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertNotEquals; +import static org.testng.Assert.assertTrue; import java.util.Collections; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/testing/JacksonSerializationTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/testing/JacksonSerializationTest.java index 0ad5f5d44..72fc70933 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/testing/JacksonSerializationTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/testing/JacksonSerializationTest.java @@ -23,7 +23,7 @@ ******************************************************************************/ package org.openrefine.wikidata.testing; -import static org.junit.Assert.assertEquals; +import static org.testng.Assert.assertEquals; import java.io.IOException; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/updates/ItemUpdateTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/updates/ItemUpdateTest.java index 250ef1ba5..2ec78301b 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/updates/ItemUpdateTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/updates/ItemUpdateTest.java @@ -23,10 +23,10 @@ ******************************************************************************/ package org.openrefine.wikidata.updates; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertTrue; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertNotEquals; +import static org.testng.Assert.assertTrue; import java.io.IOException; import java.util.Arrays; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/updates/scheduler/PointerExtractorTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/updates/scheduler/PointerExtractorTest.java index 5671c173e..b13c83c73 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/updates/scheduler/PointerExtractorTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/updates/scheduler/PointerExtractorTest.java @@ -23,7 +23,7 @@ ******************************************************************************/ package org.openrefine.wikidata.updates.scheduler; -import static org.junit.Assert.assertEquals; +import static org.testng.Assert.assertEquals; import java.math.BigDecimal; import java.util.Collections; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/updates/scheduler/QuickStatementsUpdateSchedulerTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/updates/scheduler/QuickStatementsUpdateSchedulerTest.java index 8b72a66af..e96a02847 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/updates/scheduler/QuickStatementsUpdateSchedulerTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/updates/scheduler/QuickStatementsUpdateSchedulerTest.java @@ -23,7 +23,7 @@ ******************************************************************************/ package org.openrefine.wikidata.updates.scheduler; -import static org.junit.Assert.assertEquals; +import static org.testng.Assert.assertEquals; import java.util.Arrays; import java.util.List; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/updates/scheduler/UpdateSchedulerTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/updates/scheduler/UpdateSchedulerTest.java index 5c68f1374..decbdba48 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/updates/scheduler/UpdateSchedulerTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/updates/scheduler/UpdateSchedulerTest.java @@ -23,7 +23,7 @@ ******************************************************************************/ package org.openrefine.wikidata.updates.scheduler; -import static org.junit.Assert.assertEquals; +import static org.testng.Assert.assertEquals; import java.util.Arrays; import java.util.Collections; diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/updates/scheduler/WikibaseAPIUpdateSchedulerTest.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/updates/scheduler/WikibaseAPIUpdateSchedulerTest.java index d9fec8c72..3a44fc82f 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/updates/scheduler/WikibaseAPIUpdateSchedulerTest.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/updates/scheduler/WikibaseAPIUpdateSchedulerTest.java @@ -23,7 +23,7 @@ ******************************************************************************/ package org.openrefine.wikidata.updates.scheduler; -import static org.junit.Assert.assertEquals; +import static org.testng.Assert.assertEquals; import java.util.Arrays; import java.util.List; diff --git a/main/pom.xml b/main/pom.xml index 0406a1325..2b0b7d90f 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -458,24 +458,6 @@ 2.23.4 test - - junit - junit - 4.12 - test - - - org.powermock - powermock-module-junit4 - 1.7.1 - test - - - org.powermock - powermock-api-mockito2 - 1.7.1 - test - javax.xml.bind jaxb-api diff --git a/main/tests/server/src/com/google/refine/exporters/sql/SqlExporterTests.java b/main/tests/server/src/com/google/refine/exporters/sql/SqlExporterTests.java index a6b27fce3..01cd32755 100644 --- a/main/tests/server/src/com/google/refine/exporters/sql/SqlExporterTests.java +++ b/main/tests/server/src/com/google/refine/exporters/sql/SqlExporterTests.java @@ -33,7 +33,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. package com.google.refine.exporters.sql; -import static org.junit.Assert.assertNotEquals; +import static org.testng.Assert.assertNotEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/main/tests/server/src/com/google/refine/expr/functions/strings/SmartSplitTests.java b/main/tests/server/src/com/google/refine/expr/functions/strings/SmartSplitTests.java index ec62a23cb..077b7955d 100644 --- a/main/tests/server/src/com/google/refine/expr/functions/strings/SmartSplitTests.java +++ b/main/tests/server/src/com/google/refine/expr/functions/strings/SmartSplitTests.java @@ -26,7 +26,7 @@ ******************************************************************************/ package com.google.refine.expr.functions.strings; -import static org.junit.Assert.assertArrayEquals; +import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; import java.util.Properties; @@ -36,7 +36,6 @@ import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; import com.google.refine.expr.EvalError; -import com.google.refine.expr.functions.strings.SmartSplit; import com.google.refine.grel.ControlFunctionRegistry; import com.google.refine.grel.Function; import com.google.refine.util.TestUtils; @@ -66,7 +65,7 @@ public class SmartSplitTests { String testString = "teststring1,teststring2,teststring3,teststring4"; String[] expected = { "teststring1", "teststring2", "teststring3", "teststring4" }; String[] actual = (String[]) invoke("smartSplit", testString); - assertArrayEquals(expected, actual); + assertEquals(expected, actual); } @Test @@ -74,7 +73,7 @@ public class SmartSplitTests { String testString = "teststring1 teststring2 teststring3 teststring4"; String[] expected = { "teststring1", "teststring2", "teststring3", "teststring4" }; String[] actual = (String[]) invoke("smartSplit", testString); - assertArrayEquals(expected, actual); + assertEquals(expected, actual); } @Test @@ -82,7 +81,7 @@ public class SmartSplitTests { String testString = "teststring1#teststring2#teststring3#teststring4"; String[] expected = { "teststring1", "teststring2", "teststring3", "teststring4" }; String[] actual = (String[]) invoke("smartSplit", testString, '#'); - assertArrayEquals(expected, actual); + assertEquals(expected, actual); } @Test @@ -90,7 +89,7 @@ public class SmartSplitTests { String testString = "teststring1 teststring2 teststring3 teststring4"; String[] expected = { "teststring1", "teststring2", "teststring3", "teststring4" }; String[] actual = (String[]) invoke("smartSplit", testString, ' '); - assertArrayEquals(expected, actual); + assertEquals(expected, actual); } @Test @@ -98,7 +97,7 @@ public class SmartSplitTests { String testString = "teststring1#@$teststring2#@$teststring3#@$teststring4"; String[] expected = { "teststring1", "teststring2", "teststring3", "teststring4" }; String[] actual = (String[]) invoke("smartSplit", testString, "#@$"); - assertArrayEquals(expected, actual); + assertEquals(expected, actual); } /** diff --git a/main/tests/server/src/com/google/refine/expr/util/JsonValueConverterTests.java b/main/tests/server/src/com/google/refine/expr/util/JsonValueConverterTests.java index 28ef00690..fff4e2d09 100644 --- a/main/tests/server/src/com/google/refine/expr/util/JsonValueConverterTests.java +++ b/main/tests/server/src/com/google/refine/expr/util/JsonValueConverterTests.java @@ -29,12 +29,10 @@ package com.google.refine.expr.util; import static org.testng.Assert.assertEquals; import java.io.IOException; -import java.util.Arrays; import org.testng.annotations.Test; import com.fasterxml.jackson.databind.node.ObjectNode; -import com.google.refine.expr.util.JsonValueConverter; import com.google.refine.util.ParsingUtilities; public class JsonValueConverterTests { diff --git a/main/tests/server/src/com/google/refine/model/CellTests.java b/main/tests/server/src/com/google/refine/model/CellTests.java index e6800e1ee..f7e1279ca 100644 --- a/main/tests/server/src/com/google/refine/model/CellTests.java +++ b/main/tests/server/src/com/google/refine/model/CellTests.java @@ -30,7 +30,7 @@ import java.time.format.DateTimeFormatter; import java.time.LocalDateTime; import java.time.OffsetDateTime; -import static org.junit.Assert.assertNull; +import static org.testng.Assert.assertNull; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/main/tests/server/src/com/google/refine/model/changes/DataExtensionChangeTest.java b/main/tests/server/src/com/google/refine/model/changes/DataExtensionChangeTest.java index 20bde162a..02dbdeabb 100644 --- a/main/tests/server/src/com/google/refine/model/changes/DataExtensionChangeTest.java +++ b/main/tests/server/src/com/google/refine/model/changes/DataExtensionChangeTest.java @@ -26,7 +26,7 @@ ******************************************************************************/ package com.google.refine.model.changes; -import static org.junit.Assert.assertEquals; +import static org.testng.Assert.assertEquals; import java.io.IOException; import java.io.InputStream; diff --git a/main/tests/server/src/com/google/refine/operations/recon/ReconJudgeSimilarCellsTests.java b/main/tests/server/src/com/google/refine/operations/recon/ReconJudgeSimilarCellsTests.java index acc513655..959e30a11 100644 --- a/main/tests/server/src/com/google/refine/operations/recon/ReconJudgeSimilarCellsTests.java +++ b/main/tests/server/src/com/google/refine/operations/recon/ReconJudgeSimilarCellsTests.java @@ -26,8 +26,8 @@ ******************************************************************************/ package com.google.refine.operations.recon; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNull; import java.io.IOException; import java.util.Collections; diff --git a/main/tests/server/src/com/google/refine/util/TestUtils.java b/main/tests/server/src/com/google/refine/util/TestUtils.java index 07f7b48ef..8b5993adb 100644 --- a/main/tests/server/src/com/google/refine/util/TestUtils.java +++ b/main/tests/server/src/com/google/refine/util/TestUtils.java @@ -26,8 +26,8 @@ ******************************************************************************/ package com.google.refine.util; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; +import static org.testng.Assert.assertTrue; +import static org.testng.Assert.fail; import java.io.File; import java.io.IOException; @@ -35,7 +35,6 @@ import java.io.LineNumberReader; import java.io.StringReader; import java.io.StringWriter; -import com.fasterxml.jackson.core.JsonFactory.Feature; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; @@ -46,7 +45,6 @@ import com.fasterxml.jackson.databind.MapperFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectWriter; import com.fasterxml.jackson.databind.SerializationFeature; -import com.google.refine.util.ParsingUtilities; public class TestUtils { @@ -86,7 +84,7 @@ public class TestUtils { if (!jsonA.equals(jsonB)) { jsonDiff(expected, actual); } - assertEquals(jsonA, jsonB); + assertTrue(jsonA.equals(jsonB)); } catch(Exception e) { fail("\""+expected+"\" and \""+actual+"\" are not equal as JSON strings."); }