Build/Test Issues

ExclusivelyUses attribude doesn't work for me in v2

Started by Andrii Litvinov on 6,483 views

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

Edited

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
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
Great stuff Andrii! Thanks for letting me know :)


Cheers,

Remco

Post a reply

Log in to reply.