@@ -21,7 +21,6 @@ public class NonMsdtcPromoterTests : IDisposable
21
21
private static MethodInfo s_setDistributedTransactionIdentifierMethodInfo ;
22
22
private static MethodInfo s_getPromotedTokenMethodInfo ;
23
23
private static PropertyInfo s_promoterTypePropertyInfo ;
24
- private static FieldInfo s_promoterTypeDtcFieldInfo ;
25
24
26
25
public NonMsdtcPromoterTests ( )
27
26
{
@@ -51,17 +50,12 @@ private static void VerifySoftDependencies()
51
50
52
51
// And the PropertyInfo objects for PromoterType
53
52
s_promoterTypePropertyInfo = typeof ( Transaction ) . GetTypeInfo ( ) . GetProperty ( "PromoterType" , typeof ( Guid ) ) ;
54
-
55
- // And the FieldInfo for TransactionInterop.PromoterTypeDtc
56
- s_promoterTypeDtcFieldInfo = typeof ( TransactionInterop ) . GetTypeInfo ( ) . GetField ( "PromoterTypeDtc" , BindingFlags . Public | BindingFlags . Static ) ;
57
53
}
58
54
59
55
bool allMethodsAreThere = ( ( s_enlistPromotableSinglePhaseMethodInfo != null ) &&
60
56
( s_setDistributedTransactionIdentifierMethodInfo != null ) &&
61
57
( s_getPromotedTokenMethodInfo != null ) &&
62
- ( s_promoterTypePropertyInfo != null ) &&
63
- ( s_promoterTypeDtcFieldInfo != null )
64
- ) ;
58
+ ( s_promoterTypePropertyInfo != null ) ) ;
65
59
Assert . True ( allMethodsAreThere , "At least one of the expected new methods or properties is not implemented by the available System.Transactions." ) ;
66
60
}
67
61
@@ -339,14 +333,6 @@ private static byte[] TxPromotedToken(Transaction txToGet)
339
333
return ( byte [ ] ) s_getPromotedTokenMethodInfo . Invoke ( txToGet , null ) ;
340
334
}
341
335
342
- private static Guid PromoterTypeDtc
343
- {
344
- get
345
- {
346
- return ( Guid ) s_promoterTypeDtcFieldInfo . GetValue ( null ) ;
347
- }
348
- }
349
-
350
336
#endregion
351
337
352
338
#region NonMSDTCPromoterEnlistment
@@ -1706,45 +1692,6 @@ private static void TestCase_PromoterType()
1706
1692
TestPassed ( ) ;
1707
1693
}
1708
1694
1709
- private static void TestCase_PromoterTypeMSDTC ( )
1710
- {
1711
- string testCaseDescription = "TestCase_PromoterTypeMSDTC" ;
1712
-
1713
- Trace ( "**** " + testCaseDescription + " ****" ) ;
1714
-
1715
- AutoResetEvent volCompleted = new AutoResetEvent ( false ) ;
1716
- MyEnlistment vol = null ;
1717
-
1718
- try
1719
- {
1720
- using ( TransactionScope ts = new TransactionScope ( ) )
1721
- {
1722
- Assert . Equal ( Guid . Empty , TxPromoterType ( Transaction . Current ) ) ;
1723
-
1724
- vol = CreateVolatileEnlistment ( volCompleted ) ;
1725
-
1726
- // Force MSDTC promotion.
1727
- TransactionInterop . GetDtcTransaction ( Transaction . Current ) ;
1728
-
1729
- // TransactionInterop.PromoterTypeDtc
1730
- Assert . Equal ( PromoterTypeDtc , TxPromoterType ( Transaction . Current ) ) ;
1731
-
1732
- ts . Complete ( ) ;
1733
- }
1734
- }
1735
- catch ( Exception ex )
1736
- {
1737
- Trace ( string . Format ( "Caught unexpected exception {0}:{1}" , ex . GetType ( ) . ToString ( ) , ex . ToString ( ) ) ) ;
1738
- return ;
1739
- }
1740
-
1741
- Assert . True ( volCompleted . WaitOne ( TimeSpan . FromSeconds ( 5 ) ) ) ;
1742
-
1743
- Assert . True ( vol . CommittedOutcome ) ;
1744
-
1745
- TestPassed ( ) ;
1746
- }
1747
-
1748
1695
private static void TestCase_FailPromotableSinglePhaseNotificationCalls ( )
1749
1696
{
1750
1697
string testCaseDescription = "TestCase_FailPromotableSinglePhaseNotificationCalls" ;
@@ -2133,16 +2080,6 @@ public void PSPENonMsdtcGetPromoterType()
2133
2080
TestCase_PromoterType ( ) ;
2134
2081
}
2135
2082
2136
- /// <summary>
2137
- /// PSPE Non-MSDTC Get PromoterType.
2138
- /// </summary>
2139
- [ Fact ]
2140
- public void PSPENonMsdtcGetPromoterTypeMSDTC ( )
2141
- {
2142
- // get_PromoterType
2143
- TestCase_PromoterTypeMSDTC ( ) ;
2144
- }
2145
-
2146
2083
/// <summary>
2147
2084
/// PSPE Non-MSDTC Fail PromotableSinglePhaseNotification Calls.
2148
2085
/// </summary>
0 commit comments