Skip to content

Commit 500f3dc

Browse files
committed
Update Dependencies
Also, another little test.
1 parent 007352b commit 500f3dc

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--
22
3-
Copyright 2016-2018 the original author or authors.
3+
Copyright 2016-2019 the original author or authors.
44
55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
2020
<parent>
2121
<groupId>org.mybatis</groupId>
2222
<artifactId>mybatis-parent</artifactId>
23-
<version>31-SNAPSHOT</version>
23+
<version>31</version>
2424
</parent>
2525
<groupId>org.mybatis.dynamic-sql</groupId>
2626
<artifactId>mybatis-dynamic-sql</artifactId>
@@ -94,7 +94,7 @@
9494
<dependency>
9595
<groupId>org.mybatis</groupId>
9696
<artifactId>mybatis</artifactId>
97-
<version>3.4.6</version>
97+
<version>3.5.0</version>
9898
<scope>test</scope>
9999
</dependency>
100100
<dependency>
@@ -106,7 +106,7 @@
106106
<dependency>
107107
<groupId>org.springframework</groupId>
108108
<artifactId>spring-jdbc</artifactId>
109-
<version>5.1.3.RELEASE</version>
109+
<version>5.1.4.RELEASE</version>
110110
<scope>test</scope>
111111
</dependency>
112112
<dependency>

src/test/java/examples/animal/data/AnimalDataTest.java

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2016-2018 the original author or authors.
2+
* Copyright 2016-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -109,6 +109,25 @@ public void testSelectAllRowsWithOrder() {
109109
}
110110
}
111111

112+
@Test
113+
public void testSelectAllRowsAllColumns() {
114+
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
115+
AnimalDataMapper mapper = sqlSession.getMapper(AnimalDataMapper.class);
116+
SelectStatementProvider selectStatement = select(animalData.allColumns())
117+
.from(animalData)
118+
.orderBy(id.descending())
119+
.build()
120+
.render(RenderingStrategy.MYBATIS3);
121+
List<Map<String, Object>> animals = mapper.generalSelect(selectStatement);
122+
assertAll(
123+
() -> assertThat(selectStatement.getSelectStatement()).isEqualTo("select * from AnimalData order by id DESC"),
124+
() -> assertThat(animals.size()).isEqualTo(65),
125+
() -> assertThat(animals.get(0).get("ID")).isEqualTo(65),
126+
() -> assertThat(animals.get(0).get("ANIMAL_NAME")).isEqualTo("Brachiosaurus")
127+
);
128+
}
129+
}
130+
112131
@Test
113132
public void testSelectAllRowsAllColumnsWithOrder() {
114133
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {

0 commit comments

Comments
 (0)