views:

241

answers:

1

Hi

I'm using Gallio\MbUnit 3.1 with ReSharper and Visual Studio 2008. Everything is working well except this type of test:

    [Test]
    [Row("test@badEmail@_test.com")]
    [Row("test@badEmail@_test.")]       
    public void IsValidEmail_Invalid_Emails_Should_Return_False(string invalidEmail)      
    {           
        Assert.IsFalse(AppHelper.IsValidEmail(invalidEmail),
                       "Email validation failed for " + invalidEmail);
    }

The test doesn't complete or go in to debug mode only when I pass in a parameter E.g. 'string invalidEmail'. If I remove that prameter it seems to work normally.

It will run the test if I have:

    [Test]              
    public void IsValidEmail_Invalid_Emails_Should_Return_False()      
    {           
        var invalidName = test@badEmail@_test.com";
        Assert.IsFalse(AppHelper.IsValidEmail(invalidEmail),
                       "Email validation failed for " + invalidEmail);
    }

I appreciate that there may be better ways to achieve this test but I'm trying to work my way through a book and this is how it's explaining things.

Any help is appreciated.

Davy

+1  A: 

Well, the test definitely looks ok.

Edit: I tried running your test using Gallio v3.2 build 381 and ReSharper v5.0 build 1645 and it seems to run fine.

Which versions of Gallio and ReSharper are you using?

You might also try using TestDriven.Net to run your tests in Visual Studio. There's a free personal edition that works quite well. I find it more efficient than using the ReSharper test runner.

Jeff Brown
Thanks Jeff. Where did you get 3.2 from. I can'r see on http://www.gallio.org/Downloads.aspx I'm trying the 5.0 resharper now.Anything to do with Windows 7 64 bit do you think?Can you get the test to enter debug mode?thanks again.
Davy
Meant to say - I'm on 3.1 of gallio.
Davy
You can get Gallio v3.2 nightly builds from http://ccnet.gallio.org/Distributables. You will need build 383 or newer to work with ReSharper 5.0 RC and VS 2010 RC. Build 383 should be available later today.Keep in mind that Gallio v3.2 is still pre-release software. I recommend that you subscribe to the gallio-users mailing list for support.
Jeff Brown