use of org.junit.jupiter.api.Disabled in project mybatis-3 by mybatis.
the class ScriptRunnerTest method shouldRunScriptsBySendingFullScriptAtOnce.
@Test
@Disabled("This fails with HSQLDB 2.0 due to the create index statements in the schema script")
void shouldRunScriptsBySendingFullScriptAtOnce() throws Exception {
DataSource ds = createUnpooledDataSource(JPETSTORE_PROPERTIES);
Connection conn = ds.getConnection();
ScriptRunner runner = new ScriptRunner(conn);
runner.setSendFullScript(true);
runner.setAutoCommit(true);
runner.setStopOnError(false);
runner.setErrorLogWriter(null);
runner.setLogWriter(null);
conn.close();
runJPetStoreScripts(runner);
assertProductsTableExistsAndLoaded();
}
use of org.junit.jupiter.api.Disabled in project mybatis-3 by mybatis.
the class DuplicateStatementsTest method shouldGetFirstFourUsers_Annotated.
@Test
@Disabled("fails currently - issue 507")
void shouldGetFirstFourUsers_Annotated() {
sqlSessionFactory.getConfiguration().addMapper(AnnotatedMapper.class);
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
AnnotatedMapper mapper = sqlSession.getMapper(AnnotatedMapper.class);
List<User> users = mapper.getAllUsers(new RowBounds(0, 4));
Assertions.assertEquals(4, users.size());
}
}
use of org.junit.jupiter.api.Disabled in project mybatis-3 by mybatis.
the class SelectKeyTest method testAnnotatedUpdateTable2WithGeneratedKey.
@Test
@Disabled("HSQLDB is not returning the generated column after the update")
void testAnnotatedUpdateTable2WithGeneratedKey() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
Name name = new Name();
name.setName("barney");
AnnotatedMapper mapper = sqlSession.getMapper(AnnotatedMapper.class);
int rows = mapper.insertTable2WithGeneratedKey(name);
assertEquals(1, rows);
assertEquals(22, name.getNameId());
assertEquals("barney_fred", name.getGeneratedName());
name.setName("Wilma");
rows = mapper.updateTable2WithGeneratedKey(name);
assertEquals(1, rows);
assertEquals(22, name.getNameId());
assertEquals("Wilma_fred", name.getGeneratedName());
}
}
use of org.junit.jupiter.api.Disabled in project mybatis-3 by mybatis.
the class BindingTest method shouldExecuteBoundSelectBlogUsingConstructorWithResultMapCollection.
@Disabled
// issue #480 and #101
@Test
void shouldExecuteBoundSelectBlogUsingConstructorWithResultMapCollection() {
try (SqlSession session = sqlSessionFactory.openSession()) {
BoundBlogMapper mapper = session.getMapper(BoundBlogMapper.class);
Blog blog = mapper.selectBlogUsingConstructorWithResultMapCollection(1);
assertEquals(1, blog.getId());
assertEquals("Jim Business", blog.getTitle());
assertNotNull(blog.getAuthor(), "author should not be null");
List<Post> posts = blog.getPosts();
assertTrue(posts != null && !posts.isEmpty(), "posts should not be empty");
}
}
use of org.junit.jupiter.api.Disabled in project mybatis-3 by mybatis.
the class TimestampWithTimezoneTypeHandlerTest method shouldInsertOffsetTime.
@Disabled("HSQLDB 2.4.1 does not support this.")
@Test
void shouldInsertOffsetTime() {
OffsetTime ot = OffsetTime.of(11, 22, 33, 123456000, ZoneOffset.ofHoursMinutes(1, 23));
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
Mapper mapper = sqlSession.getMapper(Mapper.class);
Record record = new Record();
record.setId(3);
record.setOt(ot);
int result = mapper.insertOffsetTime(record);
assertEquals(1, result);
sqlSession.commit();
}
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
Mapper mapper = sqlSession.getMapper(Mapper.class);
Record record = mapper.selectById(3);
assertEquals(ot, record.getOt());
}
}
Aggregations