File tree 1 file changed +12
-2
lines changed
src/AdoNet.Specification.Tests
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,12 @@ public virtual void ExecuteReader_throws_when_transaction_required()
158
158
159
159
using ( connection . BeginTransaction ( ) )
160
160
{
161
- Assert . Throws < InvalidOperationException > ( ( ) => command . ExecuteReader ( ) ) ;
161
+ Assert . Throws < InvalidOperationException > ( ( ) =>
162
+ {
163
+ using ( command . ExecuteReader ( ) )
164
+ {
165
+ }
166
+ } ) ;
162
167
}
163
168
}
164
169
}
@@ -176,7 +181,12 @@ public virtual void ExecuteReader_throws_when_transaction_mismatched()
176
181
{
177
182
command . Transaction = otherTransaction ;
178
183
179
- Assert . Throws < InvalidOperationException > ( ( ) => command . ExecuteReader ( ) ) ;
184
+ Assert . Throws < InvalidOperationException > ( ( ) =>
185
+ {
186
+ using ( command . ExecuteReader ( ) )
187
+ {
188
+ }
189
+ } ) ;
180
190
}
181
191
}
182
192
}
You can’t perform that action at this time.
0 commit comments