added more tests

This commit is contained in:
Timo Westkämper 2010-03-09 14:49:33 +00:00
parent ff204467ac
commit 1d4d0e524b
9 changed files with 102 additions and 3 deletions

View File

@ -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>();

View File

@ -1,3 +1,8 @@
/*
* Copyright (c) 2009 Mysema Ltd.
* All rights reserved.
*
*/
package com.mysema.query;
import java.util.Calendar;

View File

@ -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();

View File

@ -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();
}
}

View File

@ -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

View File

@ -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();
}
}

View File

@ -1,3 +1,8 @@
/*
* Copyright (c) 2009 Mysema Ltd.
* All rights reserved.
*
*/
package com.mysema.query;
import static com.mysema.query.Target.DERBY;

View File

@ -1,3 +1,8 @@
/*
* Copyright (c) 2009 Mysema Ltd.
* All rights reserved.
*
*/
package com.mysema.query;
import static org.junit.Assert.assertEquals;

View File

@ -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();
}
}