Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

ExclusivelyUses attribude doesn't work for me in v2
Andrii Litvinov
#1 Posted : Thursday, December 12, 2013 7:57:15 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/12/2013(UTC)
Posts: 8
Location: Ukraine

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
Hi,

I applied ExclusivelyUses attribute implemented in my solution from example in documentation to my Integration tests that use DB. It was working fine with v1.48, but when I've updated to v2.1 it stopped working. If it makes any difference I apply this attribute to only to the base class of all Integration tests.

Regards,
Andrii
Remco
#2 Posted : Thursday, December 12, 2013 10:00:41 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi Andrii -

The attribute should support inheritance and as far as I know, V2 introduced no changes in this area.. so something strange is going on here!

I'm wondering if you could confirm something for me. If you look up the test in question using the Tests Window, then right click on the column headers and choose to show the 'Exclusively Used Resources' column. Do you see your resource name shown next to the test?


Cheers,

Remco
Andrii Litvinov
#3 Posted : Friday, December 13, 2013 7:22:24 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/12/2013(UTC)
Posts: 8
Location: Ukraine

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
Hi Remco,

After some investigation I've found the issue. I've made a big refactoring of my solution yesterday and have changed the namespace for ExclusivelyUsesAttribute. After I've changed it back to NCrunch.Framework it started to work fine again.

I'll write a unit test to prevent this issue in future =).

Thanks for the hint!

Regards,
Andrii
Remco
#4 Posted : Friday, December 13, 2013 7:56:08 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Great stuff Andrii! Thanks for letting me know :)


Cheers,

Remco
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.027 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download