mirror of https://github.com/apache/openjpa.git
move to org.junit.Assert
This commit is contained in:
parent
495fe202a3
commit
e68083e8d0
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue