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

Notification

Icon
Error

mspec and generic type behaviors not found by the runner
antix
#1 Posted : Saturday, April 14, 2012 10:09:40 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/14/2012(UTC)
Posts: 5

Thanks: 2 times
Hi

If I have the following, the test (gets_a_thing) is not found by the runner

[Behaviors]
class test_behavior<TKey> {

protected It gets_a_thing = () => service.Get(key);

protected static IService<TKey> service;
protected static TKey key;
}

class test_impl_1{

Behaves_like<test_behavior<int>> test_behavoir;

Establish before_each
= () =>
{
service= new IntService();
key = 1;
};

protected static IService<TKey> service;
protected static TKey key;
}

If I take out the generic type on the behavior it works fine

I though it might be mspec, but, if I use the resharper test runner, the generic type behavior is found and the test is run
Remco
#2 Posted : Monday, April 16, 2012 2:02:34 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi, thanks for sharing this issue.

I've successfully reproduced this problem and can confirm that NCrunch does not properly recognise generic MSpec behaviors.

A fix for this issue will be included in the next version of NCrunch.


Cheers,

Remco
1 user thanked Remco for this useful post.
antix on 4/16/2012(UTC)
Remco
#3 Posted : Sunday, May 20, 2012 11:36:52 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
For anyone interested, a fix for this issue has been released recently with v1.39b of NCrunch.
1 user thanked Remco for this useful post.
antix on 5/22/2012(UTC)
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.029 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download