mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
No effective change - cleanup of imports on test code
This commit is contained in:
@@ -1,17 +1,16 @@
|
||||
package com.avaje.tests.inheritance;
|
||||
|
||||
import junit.framework.Assert;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.junit.Assert;
|
||||
|
||||
import com.avaje.ebean.BaseTestCase;
|
||||
import com.avaje.ebean.Ebean;
|
||||
import com.avaje.ebean.TxRunnable;
|
||||
import com.avaje.tests.model.basic.AttributeHolder;
|
||||
import com.avaje.tests.model.basic.ListAttribute;
|
||||
import com.avaje.tests.model.basic.ListAttributeValue;
|
||||
|
||||
public class TestDuplcateKeyException extends TestCase {
|
||||
|
||||
|
||||
public class TestDuplcateKeyException extends BaseTestCase {
|
||||
|
||||
/**
|
||||
* Test query.
|
||||
|
||||
@@ -2,9 +2,9 @@ package com.avaje.tests.inheritance;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import junit.framework.Assert;
|
||||
import junit.framework.TestCase;
|
||||
import org.junit.Assert;
|
||||
|
||||
import com.avaje.ebean.BaseTestCase;
|
||||
import com.avaje.ebean.Ebean;
|
||||
import com.avaje.ebean.Query;
|
||||
import com.avaje.tests.model.basic.Car;
|
||||
@@ -12,7 +12,7 @@ import com.avaje.tests.model.basic.Truck;
|
||||
import com.avaje.tests.model.basic.Vehicle;
|
||||
import com.avaje.tests.model.basic.VehicleDriver;
|
||||
|
||||
public class TestInheritInsert extends TestCase {
|
||||
public class TestInheritInsert extends BaseTestCase {
|
||||
|
||||
public void testCasting() {
|
||||
|
||||
@@ -23,8 +23,8 @@ public class TestInheritInsert extends TestCase {
|
||||
Vehicle v = Ebean.find(Vehicle.class, t.getId());
|
||||
if (v instanceof Truck){
|
||||
Truck t0 = (Truck)v;
|
||||
Assert.assertEquals(10d, t0.getCapacity());
|
||||
Assert.assertEquals(10d, ((Truck)v).getCapacity());
|
||||
Assert.assertEquals(Double.valueOf(10d), t0.getCapacity());
|
||||
Assert.assertEquals(Double.valueOf(10d), ((Truck)v).getCapacity());
|
||||
Assert.assertNotNull(t0.getId());
|
||||
} else {
|
||||
Assert.assertTrue("v not a Truck?", false);
|
||||
@@ -40,7 +40,7 @@ public class TestInheritInsert extends TestCase {
|
||||
v = d1.getVehicle();
|
||||
if (v instanceof Truck){
|
||||
Double capacity = ((Truck)v).getCapacity();
|
||||
Assert.assertEquals(10d, capacity);
|
||||
Assert.assertEquals(Double.valueOf(10d), capacity);
|
||||
Assert.assertNotNull(v.getId());
|
||||
} else {
|
||||
Assert.assertTrue("v not a Truck?", false);
|
||||
@@ -50,19 +50,17 @@ public class TestInheritInsert extends TestCase {
|
||||
for (VehicleDriver vehicleDriver : list) {
|
||||
if (vehicleDriver.getVehicle() instanceof Truck){
|
||||
Double capacity = ((Truck)vehicleDriver.getVehicle()).getCapacity();
|
||||
Assert.assertEquals(10d, capacity);
|
||||
Assert.assertEquals(Double.valueOf(10d), capacity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void testQuery()
|
||||
{
|
||||
// TODO: figure out whats wrong in the build process, then uncomment the lines again
|
||||
public void testQuery() {
|
||||
|
||||
Car car = new Car();
|
||||
car.setLicenseNumber("MARIOS_CAR_LICENSE");
|
||||
Ebean.save(car);
|
||||
|
||||
|
||||
|
||||
VehicleDriver driver = new VehicleDriver();
|
||||
driver.setName("Mario");
|
||||
@@ -78,12 +76,10 @@ public class TestInheritInsert extends TestCase {
|
||||
Assert.assertNotNull(drivers.get(0));
|
||||
|
||||
Assert.assertEquals("Mario", drivers.get(0).getName());
|
||||
Assert.assertEquals("MARIOS_CAR_LICENSE", drivers.get(0).getVehicle()
|
||||
.getLicenseNumber());
|
||||
Assert.assertEquals("MARIOS_CAR_LICENSE", drivers.get(0).getVehicle().getLicenseNumber());
|
||||
|
||||
Vehicle car2 = Ebean.find(Vehicle.class, car.getId());
|
||||
|
||||
// FIXME~EMG - NoSuchMethodError
|
||||
car2.setLicenseNumber("test");
|
||||
Ebean.save(car);
|
||||
|
||||
|
||||
@@ -2,8 +2,7 @@ package com.avaje.tests.inheritance;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import junit.framework.Assert;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.avaje.ebean.BaseTestCase;
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
package com.avaje.tests.inheritance;
|
||||
|
||||
import junit.framework.Assert;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.junit.Assert;
|
||||
|
||||
import com.avaje.ebean.BaseTestCase;
|
||||
import com.avaje.ebean.Ebean;
|
||||
import com.avaje.tests.model.basic.TIntChild;
|
||||
import com.avaje.tests.model.basic.TIntRoot;
|
||||
|
||||
public class TestIntInherit extends TestCase {
|
||||
public class TestIntInherit extends BaseTestCase {
|
||||
|
||||
public void testMe() {
|
||||
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
package com.avaje.tests.inheritance;
|
||||
|
||||
import junit.framework.Assert;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.avaje.ebean.BaseTestCase;
|
||||
import com.avaje.ebean.Ebean;
|
||||
import com.avaje.tests.model.basic.AttributeHolder;
|
||||
import com.avaje.tests.model.basic.ListAttribute;
|
||||
import com.avaje.tests.model.basic.ListAttributeValue;
|
||||
|
||||
public class TestSkippable extends TestCase {
|
||||
public class TestSkippable extends BaseTestCase {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(TestSkippable.class);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user