move to org.junit.Assert

This commit is contained in:
Mark Struberg 2021-04-03 18:03:42 +02:00
parent 495fe202a3
commit e68083e8d0
37 changed files with 41 additions and 39 deletions

View File

@ -27,7 +27,7 @@ import java.sql.SQLException;
import org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement;
import junit.framework.Assert;
import org.junit.Assert;
import org.junit.Test;
/**

View File

@ -26,7 +26,7 @@ import org.apache.openjpa.persistence.entity.EntityB;
import org.apache.openjpa.persistence.entity.EntityC;
import org.apache.openjpa.persistence.test.SingleEMFTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestOpenJPA2330 extends SingleEMFTestCase {

View File

@ -27,7 +27,7 @@ import javax.persistence.Query;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestAssocOverrides extends SQLListenerTestCase {
public int numEmployees = 2;
@ -229,7 +229,7 @@ public class TestAssocOverrides extends SQLListenerTestCase {
public void findObj2() {
EntityManager em = emf.createEntityManager();
PartTimeEmployee p = em.find(PartTimeEmployee.class, 1);
Assert.assertEquals(p.getHourlyWage(), (float)100);
Assert.assertEquals(p.getHourlyWage(), (float)100, 0.001f);
em.close();
}

View File

@ -34,7 +34,7 @@ import org.apache.openjpa.jdbc.sql.DBDictionary;
import org.apache.openjpa.persistence.OpenJPAEntityManagerSPI;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestAttrOverridesXml extends SQLListenerTestCase {

View File

@ -34,7 +34,7 @@ import javax.persistence.criteria.Root;
import org.apache.openjpa.persistence.test.SingleEMFTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestCompositePrimaryKeys extends SingleEMFTestCase {

View File

@ -27,7 +27,7 @@ import javax.persistence.Query;
import org.apache.openjpa.persistence.RollbackException;
import org.apache.openjpa.persistence.test.SingleEMFTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestExternalValues extends SingleEMFTestCase {

View File

@ -32,7 +32,7 @@ import org.apache.openjpa.persistence.ArgumentException;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestMany2ManyMap extends SQLListenerTestCase {

View File

@ -32,7 +32,7 @@ import org.apache.openjpa.kernel.QueryImpl;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestMany2ManyMapEx1 extends SQLListenerTestCase {

View File

@ -34,7 +34,7 @@ import org.apache.openjpa.persistence.ArgumentException;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestMany2ManyMapEx10 extends SQLListenerTestCase {

View File

@ -31,7 +31,7 @@ import org.apache.openjpa.kernel.QueryImpl;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestMany2ManyMapEx2 extends SQLListenerTestCase {

View File

@ -31,7 +31,7 @@ import org.apache.openjpa.kernel.QueryImpl;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestMany2ManyMapEx3 extends SQLListenerTestCase {

View File

@ -32,7 +32,7 @@ import org.apache.openjpa.kernel.QueryImpl;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestMany2ManyMapEx4 extends SQLListenerTestCase {

View File

@ -32,7 +32,7 @@ import org.apache.openjpa.kernel.QueryImpl;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestMany2ManyMapEx5 extends SQLListenerTestCase {

View File

@ -32,7 +32,7 @@ import org.apache.openjpa.kernel.QueryImpl;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestMany2ManyMapEx6 extends SQLListenerTestCase {

View File

@ -32,7 +32,7 @@ import org.apache.openjpa.kernel.QueryImpl;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestMany2ManyMapEx7 extends SQLListenerTestCase {

View File

@ -31,7 +31,7 @@ import org.apache.openjpa.kernel.QueryImpl;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestMany2ManyMapEx8 extends SQLListenerTestCase {

View File

@ -32,7 +32,7 @@ import org.apache.openjpa.kernel.QueryImpl;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestMany2ManyMapEx9 extends SQLListenerTestCase {

View File

@ -34,7 +34,7 @@ import org.apache.openjpa.kernel.QueryImpl;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestSpec10_1_26 extends SQLListenerTestCase {

View File

@ -32,7 +32,7 @@ import org.apache.openjpa.kernel.QueryImpl;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestSpec10_1_26_Ex1 extends SQLListenerTestCase {

View File

@ -32,7 +32,7 @@ import org.apache.openjpa.kernel.QueryImpl;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestSpec10_1_26_Ex2 extends SQLListenerTestCase {
public int numDepartments = 2;

View File

@ -32,7 +32,7 @@ import org.apache.openjpa.kernel.QueryImpl;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestSpec10_1_26_Ex3 extends SQLListenerTestCase {

View File

@ -30,7 +30,7 @@ import org.apache.openjpa.kernel.QueryImpl;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestSpec10_1_27 extends SQLListenerTestCase {
public int numItems = 2;

View File

@ -32,7 +32,7 @@ import org.apache.openjpa.kernel.QueryImpl;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestSpec10_1_27_Ex3 extends SQLListenerTestCase {
public int numCompany = 2;

View File

@ -31,7 +31,7 @@ import org.apache.openjpa.kernel.QueryImpl;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestSpec10_1_27_Ex4 extends SQLListenerTestCase {
public int numCompany = 2;

View File

@ -32,7 +32,7 @@ import org.apache.openjpa.kernel.QueryImpl;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestSpec10_1_27_Ex5 extends SQLListenerTestCase {
public int numCompany = 2;

View File

@ -31,7 +31,7 @@ import org.apache.openjpa.kernel.QueryImpl;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestSpec10_1_27_Ex6 extends SQLListenerTestCase {
public int numCompany = 2;

View File

@ -32,7 +32,7 @@ import org.apache.openjpa.kernel.QueryImpl;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestSpec10_1_27_Ex7 extends SQLListenerTestCase {
public int numCompany = 2;

View File

@ -32,7 +32,7 @@ import org.apache.openjpa.kernel.QueryImpl;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
import static junit.framework.TestCase.assertEquals;
import org.apache.openjpa.persistence.jdbc.maps.spec_10_1_27_ex6.Division;

View File

@ -31,7 +31,7 @@ import org.apache.openjpa.kernel.QueryImpl;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestSpec10_1_29_Ex1 extends SQLListenerTestCase {
public int numCompany = 2;

View File

@ -30,7 +30,7 @@ import org.apache.openjpa.kernel.QueryImpl;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestSpec10_1_29_Ex3 extends SQLListenerTestCase {
public int numStudents = 2;

View File

@ -30,7 +30,7 @@ import javax.persistence.criteria.Root;
import org.apache.openjpa.persistence.test.SQLListenerTestCase;
import junit.framework.Assert;
import org.junit.Assert;
/**
* Tests JQPL and Criteria API equivalent using left join fetch with QueryCache and DataCache enabled.

View File

@ -35,7 +35,7 @@ import org.apache.openjpa.persistence.OpenJPAEntityManager;
import org.apache.openjpa.persistence.common.utils.AbstractTestCase;
import org.apache.openjpa.persistence.kernel.common.apps.AllFieldTypesTest;
import junit.framework.Assert;
import org.junit.Assert;
import junit.framework.AssertionFailedError;
public class TestFieldRange extends BaseKernelTest {

View File

@ -27,7 +27,7 @@ import org.apache.openjpa.persistence.OpenJPAQuery;
import org.apache.openjpa.persistence.common.utils.AbstractTestCase;
import org.apache.openjpa.persistence.kernel.common.apps.AllFieldTypesTest;
import junit.framework.Assert;
import org.junit.Assert;
import junit.framework.AssertionFailedError;
/**

View File

@ -33,7 +33,7 @@ import org.apache.openjpa.jdbc.sql.SQLServerDictionary;
import org.apache.openjpa.jdbc.sql.SybaseDictionary;
import org.apache.openjpa.persistence.test.SingleEMFTestCase;
import junit.framework.Assert;
import org.junit.Assert;
/**
* Test JDBC escape syntax for date, time, and timestamp literals

View File

@ -22,7 +22,7 @@ import javax.persistence.EntityManager;
import org.apache.openjpa.persistence.test.SingleEMFTestCase;
import junit.framework.Assert;
import org.junit.Assert;
/**
* Unit test to verify the foreign key of a Join column in an association (aText), that is exposed as an

View File

@ -24,7 +24,7 @@ import javax.persistence.EntityManager;
import org.apache.openjpa.persistence.test.SingleEMFTestCase;
import junit.framework.Assert;
import org.junit.Assert;
public class TestRelationFieldAsPrimaryKeyAndForeignKey

View File

@ -18,13 +18,14 @@
*/
package org.apache.openjpa.tools.maven.test;
import junit.framework.TestCase;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import org.junit.Test;
import static org.junit.Assert.*;
public class ItDropSchemaTest extends TestCase {
public class ItDropSchemaTest {
/** contains the directory where all generated results are placed */
private final static String TARGET_DIR = "target";
@ -39,6 +40,7 @@ public class ItDropSchemaTest extends TestCase {
* check if the generated SQL script is correct.
* @throws Exception
*/
@Test
public void testSqlGeneration() throws Exception
{
File sqlFile = new File( TARGET_DIR, SQL_FILE );