mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-19 21:00:53 +08:00
added more tests
This commit is contained in:
parent
ff204467ac
commit
1d4d0e524b
@ -22,7 +22,6 @@ public final class Connections {
|
||||
private static final String INSERT_INTO_EMPLOYEE = "insert into employee2 " +
|
||||
"(id, firstname, lastname, salary, datefield, timefield, superior_id) " +
|
||||
"values (?,?,?,?,?,?,?)";
|
||||
|
||||
|
||||
private static ThreadLocal<Connection> connHolder = new ThreadLocal<Connection>();
|
||||
|
||||
|
||||
@ -1,3 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2009 Mysema Ltd.
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
package com.mysema.query;
|
||||
|
||||
import java.util.Calendar;
|
||||
|
||||
@ -1,3 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2009 Mysema Ltd.
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
package com.mysema.query;
|
||||
|
||||
import static com.mysema.query.Target.MYSQL;
|
||||
@ -21,7 +26,7 @@ public abstract class DeleteBaseTest extends AbstractBaseTest{
|
||||
|
||||
@Test
|
||||
@ExcludeIn(MYSQL)
|
||||
public void testDelete() throws SQLException{
|
||||
public void delete() throws SQLException{
|
||||
try{
|
||||
// TODO : FIXME
|
||||
long count = query().from(survey).count();
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
package com.mysema.query;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import com.mysema.query.sql.DerbyTemplates;
|
||||
import com.mysema.testutil.FilteringTestRunner;
|
||||
import com.mysema.testutil.Label;
|
||||
|
||||
@RunWith(FilteringTestRunner.class)
|
||||
@Label(Target.DERBY)
|
||||
public class DeleteDerbyTest extends DeleteBaseTest{
|
||||
|
||||
@BeforeClass
|
||||
public static void setUp() throws Exception {
|
||||
Connections.initDerby();
|
||||
}
|
||||
|
||||
@Before
|
||||
public void setUpForTest() {
|
||||
dialect = new DerbyTemplates().newLineToSingleSpace();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,3 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2009 Mysema Ltd.
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
package com.mysema.query;
|
||||
|
||||
import static com.mysema.query.Connections.getConnection;
|
||||
@ -16,7 +21,7 @@ public abstract class InsertBaseTest extends AbstractBaseTest{
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInsert(){
|
||||
public void insert(){
|
||||
// create table survey (id int,name varchar(30))
|
||||
|
||||
// with columns
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
package com.mysema.query;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import com.mysema.query.sql.DerbyTemplates;
|
||||
import com.mysema.testutil.FilteringTestRunner;
|
||||
import com.mysema.testutil.Label;
|
||||
|
||||
@RunWith(FilteringTestRunner.class)
|
||||
@Label(Target.DERBY)
|
||||
public class InsertDerbyTest extends InsertBaseTest{
|
||||
|
||||
@BeforeClass
|
||||
public static void setUp() throws Exception {
|
||||
Connections.initDerby();
|
||||
}
|
||||
|
||||
@Before
|
||||
public void setUpForTest() {
|
||||
dialect = new DerbyTemplates().newLineToSingleSpace();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,3 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2009 Mysema Ltd.
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
package com.mysema.query;
|
||||
|
||||
import static com.mysema.query.Target.DERBY;
|
||||
|
||||
@ -1,3 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2009 Mysema Ltd.
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
package com.mysema.query;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
package com.mysema.query;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import com.mysema.query.sql.DerbyTemplates;
|
||||
import com.mysema.testutil.FilteringTestRunner;
|
||||
import com.mysema.testutil.Label;
|
||||
|
||||
@RunWith(FilteringTestRunner.class)
|
||||
@Label(Target.DERBY)
|
||||
public class UpdateDerbyTest extends UpdateBaseTest{
|
||||
|
||||
@BeforeClass
|
||||
public static void setUp() throws Exception {
|
||||
Connections.initDerby();
|
||||
}
|
||||
|
||||
@Before
|
||||
public void setUpForTest() {
|
||||
dialect = new DerbyTemplates().newLineToSingleSpace();
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user