File tree 3 files changed +8
-8
lines changed
Rubberduck.Main/ComClientLibrary/UnitTesting 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ public void DateCallback(IntPtr retVal)
24
24
}
25
25
if ( PassThrough )
26
26
{
27
- FakesProvider . SuspendFake ( " Now" ) ;
27
+ FakesProvider . SuspendFake ( typeof ( Now ) ) ;
28
28
var nativeCall = Marshal . GetDelegateForFunctionPointer < DateDelegate > ( NativeFunctionAddress ) ;
29
29
nativeCall ( retVal ) ;
30
- FakesProvider . ResumeFake ( " Now" ) ;
30
+ FakesProvider . ResumeFake ( typeof ( Now ) ) ;
31
31
return ;
32
32
}
33
33
Marshal . GetNativeVariantForObject ( ReturnValue ?? 0 , retVal ) ;
Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ public void TimeCallback(IntPtr retVal)
24
24
}
25
25
if ( PassThrough )
26
26
{
27
- FakesProvider . SuspendFake ( " Now" ) ;
27
+ FakesProvider . SuspendFake ( typeof ( Now ) ) ;
28
28
var nativeCall = Marshal . GetDelegateForFunctionPointer < TimeDelegate > ( NativeFunctionAddress ) ;
29
29
nativeCall ( retVal ) ;
30
- FakesProvider . ResumeFake ( " Now" ) ;
30
+ FakesProvider . ResumeFake ( typeof ( Now ) ) ;
31
31
return ;
32
32
}
33
33
Marshal . GetNativeVariantForObject ( ReturnValue ?? 0 , retVal ) ;
Original file line number Diff line number Diff line change @@ -37,23 +37,23 @@ public void StartTest()
37
37
CodeIsUnderTest = true ;
38
38
}
39
39
40
- public static void SuspendFake ( String typename )
40
+ public static void SuspendFake ( Type type )
41
41
{
42
42
foreach ( var fake in ActiveFakes . Values )
43
43
{
44
- if ( fake . GetType ( ) . Name == typename )
44
+ if ( fake . GetType ( ) == type )
45
45
{
46
46
fake . DisableHook ( ) ;
47
47
return ;
48
48
}
49
49
}
50
50
}
51
51
52
- public static void ResumeFake ( String typename )
52
+ public static void ResumeFake ( Type type )
53
53
{
54
54
foreach ( var fake in ActiveFakes . Values )
55
55
{
56
- if ( fake . GetType ( ) . Name == typename )
56
+ if ( fake . GetType ( ) == type )
57
57
{
58
58
fake . EnableHook ( ) ;
59
59
return ;
You can’t perform that action at this time.
0 commit comments