File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
src/test/java/org/mybatis/dynamic/sql/insert Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,24 @@ void testSelectiveInsertStatementBuilder() {
115
115
assertThat (insertStatement .getInsertStatement ()).isEqualTo (expected );
116
116
}
117
117
118
+ @ Test
119
+ void testDeprecatedMethod () {
120
+ TestRecord record = new TestRecord ();
121
+ record .setLastName ("jones" );
122
+ record .setOccupation ("dino driver" );
123
+
124
+ InsertStatementProvider <TestRecord > insertStatement = insert (record )
125
+ .into (foo )
126
+ .map (id ).toPropertyWhenPresent ("id" , record ::getId )
127
+ .map (firstName ).toPropertyWhenPresent ("firstName" , record ::getFirstName )
128
+ .map (lastName ).toPropertyWhenPresent ("lastName" , record ::getLastName )
129
+ .map (occupation ).toPropertyWhenPresent ("occupation" , record ::getOccupation )
130
+ .build ()
131
+ .render (RenderingStrategies .MYBATIS3 );
132
+
133
+ assertThat (insertStatement .getRow ()).isEqualTo (insertStatement .getRecord ());
134
+ }
135
+
118
136
static class TestRecord {
119
137
private Integer id ;
120
138
private String firstName ;
You can’t perform that action at this time.
0 commit comments