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

Notification

Icon
Error

Tests in generic Test classes not recognized
peitor
#1 Posted : Wednesday, May 18, 2011 1:15:23 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/17/2011(UTC)
Posts: 4
Location: sydney

Thanks: 1 times
I have a generic test class, that I reuse for different providers...
Sample code to reproduce


using NUnit.Framework;

namespace AuthenticationProvider.Business.Tests
{

[TestFixture]
public class InMemoryProviderTests : UserProviderTests<InMemoryUserProvider>
{

}

[TestFixture]
public class FileUserProviderTests : UserProviderTests<FileUserProvider>
{

}

[TestFixture]
public class UserProviderTests<T> where T: IProvideUserInfo, new()
{
const string Usercode = "Irrelevant String";
readonly IProvideUserInfo target = new T();

[Test]
public void GivenIAddNull_ItShouldReturnFalse()
{
var result = target.AddOrUpdate(Usercode, null);

Assert.That(result, Is.EqualTo(false));
}
}

}


NCrunch doesn't recognize the tests

See screenshot here
http://uploadpic.org/v.php?img=pvbtGxFYgC

[1] No dots
[2] No dots
[3] Black dot, should be green
[4] Black dot, Should be red
[5] TestDriven fails for FileUserProvider


Good job guys!!!

I have a couple of more feature requests, that I would like to send via email... This forum makes adding images so hard...
Remco
#2 Posted : Wednesday, May 18, 2011 6:25:26 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 862 times
Was thanked: 1176 time(s) in 1097 post(s)
I have seen a similar problem around this to do with the inheritance of the InclusivelyUsesAttribute and ExclusivelyUsesAttribute ... didn't realise it would impact the test attributes also. I'll have a look into it.
Remco
#3 Posted : Monday, September 5, 2011 7:49:41 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 862 times
Was thanked: 1176 time(s) in 1097 post(s)
For anyone interested, this issue should be fixed in the recently released 1.33b.
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.028 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download