MbUnit (gallio) and Visual Studio.Net Tests Not Completing or Debugging

Posted by Davy on Stack Overflow See other posts from Stack Overflow or by Davy
Published on 2010-03-23T20:51:32Z Indexed on 2010/03/23 20:53 UTC
Read the original article Hit count: 466

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

© Stack Overflow or respective owner

Related posts about mbunit

Related posts about gallio