In MBUnit v2 I did this:

    public class ConnectionStringFactory
        {
            [Factory]
            public string ConnectionString
            {
                get
                {
                    return
ConfigurationManager.ConnectionStrings["MyConnection"].ConnectionString;
                }
            }
        }

 
[ProviderFactory(typeof(ConnectionStringFactory),typeof(string))]
        public class CustomerTests
        {
            public void GetCustomerTest(string connectionString)
            {

            }

            public void GetCustomersTest(string connectionString)
            {

            }
        }

I had to create ONE Factory class returning me a connectionString
which gets injected into each test method of a unit test class.

How can this be done with MBUnit v3 where the ProviderFactory is gone?

I played a lot with the Factory class, but the result is not what I
want.

I want to a Connection string factory used by all test classes where
the connection string

is injected into each test method automatically.

-- 
You received this message because you are subscribed to the Google Groups 
"MbUnit.User" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/mbunituser?hl=en.

Reply via email to