1
1
/**
2
- * Copyright 2009-2018 the original author or authors.
2
+ * Copyright 2009-2019 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
19
19
import org .apache .ibatis .annotations .Options ;
20
20
import org .apache .ibatis .annotations .Select ;
21
21
import org .apache .ibatis .builder .annotation .MapperAnnotationBuilder ;
22
- import org .apache .ibatis .builder .xml .XMLMapperBuilder ;
23
22
import org .apache .ibatis .executor .keygen .Jdbc3KeyGenerator ;
24
- import org .apache .ibatis .io .Resources ;
25
23
import org .apache .ibatis .mapping .MappedStatement ;
26
24
import org .apache .ibatis .mapping .ResultSetType ;
27
25
import org .apache .ibatis .mapping .StatementType ;
28
26
import org .apache .ibatis .session .Configuration ;
29
- import org .apache .ibatis .type .TypeHandler ;
30
- import org .junit .Test ;
27
+ import org .junit .jupiter .api .Test ;
31
28
32
- import java .io .InputStream ;
33
- import java .util .regex .Pattern ;
34
-
35
- import static com .googlecode .catchexception .apis .BDDCatchException .caughtException ;
36
- import static com .googlecode .catchexception .apis .BDDCatchException .when ;
37
29
import static org .assertj .core .api .Assertions .assertThat ;
38
- import static org .assertj .core .api .BDDAssertions .then ;
39
30
40
- public class AnnotationMapperBuilderTest {
31
+ class AnnotationMapperBuilderTest {
41
32
42
33
@ Test
43
- public void withOptions () throws Exception {
34
+ void withOptions () {
44
35
Configuration configuration = new Configuration ();
45
36
MapperAnnotationBuilder builder = new MapperAnnotationBuilder (configuration , Mapper .class );
46
37
builder .parse ();
@@ -61,7 +52,7 @@ public void withOptions() throws Exception {
61
52
}
62
53
63
54
@ Test
64
- public void withOptionsAndWithoutOptionsAttributesWhenSpecifyDefaultValue () throws Exception {
55
+ void withOptionsAndWithoutOptionsAttributesWhenSpecifyDefaultValue () {
65
56
Configuration configuration = new Configuration ();
66
57
configuration .setDefaultResultSetType (ResultSetType .SCROLL_INSENSITIVE );
67
58
MapperAnnotationBuilder builder = new MapperAnnotationBuilder (configuration , Mapper .class );
@@ -73,7 +64,7 @@ public void withOptionsAndWithoutOptionsAttributesWhenSpecifyDefaultValue() thro
73
64
74
65
75
66
@ Test
76
- public void withOptionsAndWithoutOptionsAttributesWhenNotSpecifyDefaultValue () throws Exception {
67
+ void withOptionsAndWithoutOptionsAttributesWhenNotSpecifyDefaultValue () {
77
68
Configuration configuration = new Configuration ();
78
69
MapperAnnotationBuilder builder = new MapperAnnotationBuilder (configuration , Mapper .class );
79
70
builder .parse ();
@@ -83,7 +74,7 @@ public void withOptionsAndWithoutOptionsAttributesWhenNotSpecifyDefaultValue() t
83
74
}
84
75
85
76
@ Test
86
- public void withoutOptionsWhenSpecifyDefaultValue () throws Exception {
77
+ void withoutOptionsWhenSpecifyDefaultValue () {
87
78
Configuration configuration = new Configuration ();
88
79
configuration .setDefaultResultSetType (ResultSetType .SCROLL_INSENSITIVE );
89
80
MapperAnnotationBuilder builder = new MapperAnnotationBuilder (configuration , Mapper .class );
@@ -94,7 +85,7 @@ public void withoutOptionsWhenSpecifyDefaultValue() throws Exception {
94
85
}
95
86
96
87
@ Test
97
- public void withoutOptionsWhenNotSpecifyDefaultValue () throws Exception {
88
+ void withoutOptionsWhenNotSpecifyDefaultValue () {
98
89
Configuration configuration = new Configuration ();
99
90
MapperAnnotationBuilder builder = new MapperAnnotationBuilder (configuration , Mapper .class );
100
91
builder .parse ();
@@ -103,7 +94,7 @@ public void withoutOptionsWhenNotSpecifyDefaultValue() throws Exception {
103
94
assertThat (mappedStatement .getResultSetType ()).isEqualTo (ResultSetType .DEFAULT );
104
95
}
105
96
106
- public interface Mapper {
97
+ interface Mapper {
107
98
108
99
@ Insert ("insert into test (name) values(#{name})" )
109
100
@ Options (useGeneratedKeys = true , keyColumn = "key_column" , keyProperty = "keyProperty" )
0 commit comments