@@ -325,15 +325,14 @@ public void EnsureTransactionsAreSupported_should_throw_when_there_are_no_connec
325
325
}
326
326
327
327
[ Theory ]
328
- [ InlineData ( "NT" ) ]
329
- [ InlineData ( "UT" ) ]
330
- [ InlineData ( "PN" ) ]
331
- [ InlineData ( "PN,ST" ) ]
332
- [ InlineData ( "PT,SN" ) ]
333
- [ InlineData ( "RN" ) ]
334
- [ InlineData ( "RN,RT" ) ]
335
- [ InlineData ( "RT,RN" ) ]
336
- public void EnsureTransactionsAreSupported_should_throw_when_any_connected_data_bearing_server_does_not_support_transactions ( string scenarios )
328
+ [ InlineData ( "NT" , "Standalone servers do not support transactions." ) ]
329
+ [ InlineData ( "PN" , "Server version 3.99.99 does not support the Transactions feature." ) ]
330
+ [ InlineData ( "PN,ST" , "Server version 3.99.99 does not support the Transactions feature." ) ]
331
+ [ InlineData ( "PT,SN" , "Server version 3.99.99 does not support the Transactions feature." ) ]
332
+ [ InlineData ( "RN" , "Server version 4.1.5 does not support the ShardedTransactions feature." ) ]
333
+ [ InlineData ( "RN,RT" , "Server version 4.1.5 does not support the ShardedTransactions feature." ) ]
334
+ [ InlineData ( "RT,RN" , "Server version 4.1.5 does not support the ShardedTransactions feature." ) ]
335
+ public void EnsureTransactionsAreSupported_should_throw_when_any_connected_data_bearing_server_does_not_support_transactions ( string scenarios , string expectedMesage )
337
336
{
338
337
var clusterId = new ClusterId ( 1 ) ;
339
338
string unsupportedFeatureName = null ;
@@ -360,11 +359,7 @@ public void EnsureTransactionsAreSupported_should_throw_when_any_connected_data_
360
359
var exception = Record . Exception ( ( ) => subject . EnsureTransactionsAreSupported ( ) ) ;
361
360
362
361
var e = exception . Should ( ) . BeOfType < NotSupportedException > ( ) . Subject ;
363
- e . Message . Should ( ) . Match < string > (
364
- s => s . Contains ( $ "does not support the { unsupportedFeatureName } feature.") ||
365
- s . Contains ( "Transactions are supported only in sharded cluster of replica set deployments." ) ||
366
- s . Contains ( "StartTransaction cannot determine if transactions are supported because there are no connected servers." )
367
- ) ;
362
+ e . Message . Should ( ) . Be ( expectedMesage ) ;
368
363
}
369
364
370
365
// private methods
0 commit comments