Problem with MethodMissingTests

Developer
Jun 10, 2010 at 10:11 AM

Hi,

I just discovered that all tests in the MethodMissingTests project are failing.

The problem seems to be that the Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet method is not intercepted by Isolator.

ulu

Coordinator
Jun 10, 2010 at 11:58 AM
Method Missing was just an experiment. the whole project can be removed from the solution.
I'm pretty sure "NewLateBinding" is just not covered in the "ShouldIntercept" filter. can you check before removing? if it still works, let's keep it.

On Thu, Jun 10, 2010 at 1:11 PM, ulu <notifications@codeplex.com> wrote:

From: ulu

Hi,

I just discovered that all tests in the MethodMissingTests project are failing.

The problem seems to be that the Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet method is not intercepted by Isolator.

ulu

Read the full discussion online.

To add a post to this discussion, reply to this email (CThru@discussions.codeplex.com)

To start a new discussion for this project, email CThru@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com




--
Thanks,

Roy Osherove
www.TypeMock.com - Unit Testing, Plain Smart

Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
A blog for team leaders: http://5Whys.com
my .NET blog: http://www.ISerializable.com
Twitter: http://twitter.com/RoyOsherove
+972-524-655388 (GMT+2)
Developer
Jun 10, 2010 at 3:08 PM
No, I believe the problem is elsewhere.

I added a TraceAttribute and invoked the LateCall method manually
(with the correct method name so it won't throw), and it didn't trace
it (it traced the underlying method call). Meaning that the
TraceAttribute couldn't intercept it for some reason (but it did
intercept the other calls).

Here's the code:
<Test()> _
Public Sub CanInterceptTheCallToLateBinding()
CThruEngine.AddAspect(New TraceAspect(Function(info) True))
CThruEngine.StartListening()
Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Nothing,
GetType(TypeUnderTest), "ExistingMethod", Nothing, Nothing,
Type.EmptyTypes, Nothing, True)
CThruEngine.StopListeningAndReset()

End Sub

The TraceAspect should have traced the call to
Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall, but
the actual trace is:
TestDriven.TestRunner.ThreadTestRunner+Runner.Pump()
CThru.BuiltInAspects.MissingMethodAspect..ctor()
CThru.Aspect..ctor()
TestDriven.TestRunner.ThreadTestRunner+WriteLineCategoryMessage.Invoke()
CThru.CThruEngine.AddAspect(CThru.BuiltInAspects.MissingMethodAspect)
CThru.CThruEngine.GetUniqueKey(MissingMethodAspect)
CThru.CThruEngine.AddAspect(MissingMethodAspect,
CThru.BuiltInAspects.MissingMethodAspect)
CThru.CThruEngine.get_Verbose()
CThru.CThruEngine+AspectHandler..ctor(CThru.BuiltInAspects.MissingMethodAspect)
CThru.MethodMissingTests.TypeUnderTest.ExistingMethod()
CThru.CThruEngine.StopListeningAndReset()
CThru.CThruEngine.StopListening()

Not a big deal actually, I mean, who's going to use these VB
assemblies in their code. But could it be that Isolator can't
intercept some other important calls?

2010/6/10 RoyOsherove <notifications@codeplex.com>:
> From: RoyOsherove
>
> Method Missing was just an experiment. the whole project can be removed from
> the solution.
> I'm pretty sure "NewLateBinding" is just not covered in the
> "ShouldIntercept" filter. can you check before removing? if it still works,
> let's keep it.
>
> On Thu, Jun 10, 2010 at 1:11 PM, ulu <[email removed]> wrote:
>
> From: ulu
>
> Hi,
>
> I just discovered that all tests in the MethodMissingTests project are
> failing.
>
> The problem seems to be that the
> Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet method is not
> intercepted by Isolator.
>
> ulu
>
> Read the full discussion online.
>
> To add a post to this discussion, reply to this email
> ([email removed])
>
> To start a new discussion for this project, email
> [email removed]
>
> You are receiving this email because you subscribed to this discussion on
> CodePlex. You can unsubscribe or change your settings on codePlex.com.
>
> Please note: Images and attachments will be removed from emails. Any posts
> to this discussion will also be available online at codeplex.com
>
>
> --
> Thanks,
>
> Roy Osherove
> www.TypeMock.com - Unit Testing, Plain Smart
>
> Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
> A blog for team leaders: http://5Whys.com
> my .NET blog: http://www.ISerializable.com
> Twitter: http://twitter.com/RoyOsherove
> +972-524-655388 (GMT+2)
>
> Read the full discussion online.
>
> To add a post to this discussion, reply to this email
> ([email removed])
>
> To start a new discussion for this project, email
> [email removed]
>
> You are receiving this email because you subscribed to this discussion on
> CodePlex. You can unsubscribe or change your settings on codePlex.com.
>
> Please note: Images and attachments will be removed from emails. Any posts
> to this discussion will also be available online at codeplex.com
Coordinator
Jun 10, 2010 at 4:18 PM
did you look inside the MissingMethodAspect that is built in?

On Thu, Jun 10, 2010 at 6:09 PM, ulu <notifications@codeplex.com> wrote:

From: ulu

No, I believe the problem is elsewhere.

I added a TraceAttribute and invoked the LateCall method manually
(with the correct method name so it won't throw), and it didn't trace
it (it traced the underlying method call). Meaning that the
TraceAttribute couldn't intercept it for some reason (but it did
intercept the other calls).

Here's the code:
<Test()> _
Public Sub CanInterceptTheCallToLateBinding()
CThruEngine.AddAspect(New TraceAspect(Function(info) True))
CThruEngine.StartListening()
Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Nothing,
GetType(TypeUnderTest), "ExistingMethod", Nothing, Nothing,
Type.EmptyTypes, Nothing, True)
CThruEngine.StopListeningAndReset()

End Sub

The TraceAspect should have traced the call to
Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall, but
the actual trace is:
TestDriven.TestRunner.ThreadTestRunner+Runner.Pump()
CThru.BuiltInAspects.MissingMethodAspect..ctor()
CThru.Aspect..ctor()
TestDriven.TestRunner.ThreadTestRunner+WriteLineCategoryMessage.Invoke()
CThru.CThruEngine.AddAspect(CThru.BuiltInAspects.MissingMethodAspect)
CThru.CThruEngine.GetUniqueKey(MissingMethodAspect)
CThru.CThruEngine.AddAspect(MissingMethodAspect,
CThru.BuiltInAspects.MissingMethodAspect)
CThru.CThruEngine.get_Verbose()
CThru.CThruEngine+AspectHandler..ctor(CThru.BuiltInAspects.MissingMethodAspect)
CThru.MethodMissingTests.TypeUnderTest.ExistingMethod()
CThru.CThruEngine.StopListeningAndReset()
CThru.CThruEngine.StopListening()

Not a big deal actually, I mean, who's going to use these VB
assemblies in their code. But could it be that Isolator can't
intercept some other important calls?

2010/6/10 RoyOsherove <notifications@codeplex.com>:
> From: RoyOsherove

>
> Method Missing was just an experiment. the whole project can be removed from
> the solution.
> I'm pretty sure "NewLateBinding" is just not covered in the
> "ShouldIntercept" filter. can you check before removing? if it still works,
> let's keep it.
>
> On Thu, Jun 10, 2010 at 1:11 PM, ulu <[email removed]> wrote:
>
> From: ulu
>
> Hi,
>
> I just discovered that all tests in the MethodMissingTests project are
> failing.
>
> The problem seems to be that the
> Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet method is not
> intercepted by Isolator.
>
> ulu
>
> Read the full discussion online.
>
> To add a post to this discussion, reply to this email
> ([email removed])

>
> To start a new discussion for this project, email
> [email removed]

>
> You are receiving this email because you subscribed to this discussion on
> CodePlex. You can unsubscribe or change your settings on codePlex.com.
>
> Please note: Images and attachments will be removed from emails. Any posts
> to this discussion will also be available online at codeplex.com
>
>
> --
> Thanks,
>
> Roy Osherove
> www.TypeMock.com - Unit Testing, Plain Smart
>
> Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
> A blog for team leaders: http://5Whys.com
> my .NET blog: http://www.ISerializable.com
> Twitter: http://twitter.com/RoyOsherove
> +972-524-655388 (GMT+2)
>
> Read the full discussion online.
>
> To add a post to this discussion, reply to this email
> ([email removed])

>
> To start a new discussion for this project, email
> [email removed]

>
> You are receiving this email because you subscribed to this discussion on
> CodePlex. You can unsubscribe or change your settings on codePlex.com.
>
> Please note: Images and attachments will be removed from emails. Any posts
> to this discussion will also be available online at codeplex.com

Read the full discussion online.

To add a post to this discussion, reply to this email (CThru@discussions.codeplex.com)

To start a new discussion for this project, email CThru@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com




--
Thanks,

Roy Osherove
www.TypeMock.com - Unit Testing, Plain Smart

Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
A blog for team leaders: http://5Whys.com
my .NET blog: http://www.ISerializable.com
Twitter: http://twitter.com/RoyOsherove
+972-524-655388 (GMT+2)
Developer
Jun 13, 2010 at 9:43 AM
Yes I did, but the problem is not there. My experiments any calls to
any types from the Microsoft.VisualBasic assembly are not being
intercepted by the engine (I tried it with TraceAspect).

Artem

2010/6/10 RoyOsherove <notifications@codeplex.com>:
> From: RoyOsherove
>
> did you look inside the MissingMethodAspect that is built in?
>
> On Thu, Jun 10, 2010 at 6:09 PM, ulu <[email removed]> wrote:
>
> From: ulu
>
> No, I believe the problem is elsewhere.
>
> I added a TraceAttribute and invoked the LateCall method manually
> (with the correct method name so it won't throw), and it didn't trace
> it (it traced the underlying method call). Meaning that the
> TraceAttribute couldn't intercept it for some reason (but it did
> intercept the other calls).
>
> Here's the code:
> <Test()> _
> Public Sub CanInterceptTheCallToLateBinding()
> CThruEngine.AddAspect(New TraceAspect(Function(info) True))
> CThruEngine.StartListening()
> Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Nothing,
> GetType(TypeUnderTest), "ExistingMethod", Nothing, Nothing,
> Type.EmptyTypes, Nothing, True)
> CThruEngine.StopListeningAndReset()
>
> End Sub
>
> The TraceAspect should have traced the call to
> Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall, but
> the actual trace is:
> TestDriven.TestRunner.ThreadTestRunner+Runner.Pump()
> CThru.BuiltInAspects.MissingMethodAspect..ctor()
> CThru.Aspect..ctor()
> TestDriven.TestRunner.ThreadTestRunner+WriteLineCategoryMessage.Invoke()
> CThru.CThruEngine.AddAspect(CThru.BuiltInAspects.MissingMethodAspect)
> CThru.CThruEngine.GetUniqueKey(MissingMethodAspect)
> CThru.CThruEngine.AddAspect(MissingMethodAspect,
> CThru.BuiltInAspects.MissingMethodAspect)
> CThru.CThruEngine.get_Verbose()
> CThru.CThruEngine+AspectHandler..ctor(CThru.BuiltInAspects.MissingMethodAspect)
> CThru.MethodMissingTests.TypeUnderTest.ExistingMethod()
> CThru.CThruEngine.StopListeningAndReset()
> CThru.CThruEngine.StopListening()
>
> Not a big deal actually, I mean, who's going to use these VB
> assemblies in their code. But could it be that Isolator can't
> intercept some other important calls?
>
> 2010/6/10 RoyOsherove <[email removed]>:
>> From: RoyOsherove
>>
>> Method Missing was just an experiment. the whole project can be removed
>> from
>> the solution.
>> I'm pretty sure "NewLateBinding" is just not covered in the
>> "ShouldIntercept" filter. can you check before removing? if it still
>> works,
>> let's keep it.
>>
>> On Thu, Jun 10, 2010 at 1:11 PM, ulu <[email removed]> wrote:
>>
>> From: ulu
>>
>> Hi,
>>
>> I just discovered that all tests in the MethodMissingTests project are
>> failing.
>>
>> The problem seems to be that the
>> Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet method is
>> not
>> intercepted by Isolator.
>>
>> ulu
>>
>> Read the full discussion online.
>>
>> To add a post to this discussion, reply to this email
>> ([email removed])
>>
>> To start a new discussion for this project, email
>> [email removed]
>>
>> You are receiving this email because you subscribed to this discussion on
>> CodePlex. You can unsubscribe or change your settings on codePlex.com.
>>
>> Please note: Images and attachments will be removed from emails. Any posts
>> to this discussion will also be available online at codeplex.com
>>
>>
>> --
>> Thanks,
>>
>> Roy Osherove
>> www.TypeMock.com - Unit Testing, Plain Smart
>>
>> Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
>> A blog for team leaders: http://5Whys.com
>> my .NET blog: http://www.ISerializable.com
>> Twitter: http://twitter.com/RoyOsherove
>> +972-524-655388 (GMT+2)
>>
>> Read the full discussion online.
>>
>> To add a post to this discussion, reply to this email
>> ([email removed])
>>
>> To start a new discussion for this project, email
>> [email removed]
>>
>> You are receiving this email because you subscribed to this discussion on
>> CodePlex. You can unsubscribe or change your settings on codePlex.com.
>>
>> Please note: Images and attachments will be removed from emails. Any posts
>> to this discussion will also be available online at codeplex.com
>
> Read the full discussion online.
>
> To add a post to this discussion, reply to this email
> ([email removed])
>
> To start a new discussion for this project, email
> [email removed]
>
> You are receiving this email because you subscribed to this discussion on
> CodePlex. You can unsubscribe or change your settings on codePlex.com.
>
> Please note: Images and attachments will be removed from emails. Any posts
> to this discussion will also be available online at codeplex.com
>
>
> --
> Thanks,
>
> Roy Osherove
> www.TypeMock.com - Unit Testing, Plain Smart
>
> Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
> A blog for team leaders: http://5Whys.com
> my .NET blog: http://www.ISerializable.com
> Twitter: http://twitter.com/RoyOsherove
> +972-524-655388 (GMT+2)
>
> Read the full discussion online.
>
> To add a post to this discussion, reply to this email
> ([email removed])
>
> To start a new discussion for this project, email
> [email removed]
>
> You are receiving this email because you subscribed to this discussion on
> CodePlex. You can unsubscribe or change your settings on codePlex.com.
>
> Please note: Images and attachments will be removed from emails. Any posts
> to this discussion will also be available online at codeplex.com