Defaulting dependencies What are some advantages and disadvantages of providing default implementations for dependencies. I have chosen to do this because it allows the objects to be easily used in the application but also allows me to mock for unit testing.

public class RoleProvider : RoleProviderBase
{
    private IRoleDataProvider _roleDataProvider;

    private IEntitlementsDataProvider EntitlementsDataProvider
    {
        get
        {
            if (_roleDataProvider == null)
            {
                _roleDataProvider = new RoleDataProvider();
            }
            return _roleDataProvider;
        }
    }

    public RoleProvider(IRoleDataProvider roleDataProvider)
    {
        _roleDataProvider = roleDataProvider;
    }

    public RoleProvider()
    {
    }
}
I personally don't see any problem with this (maybe someone else might provide better insight) but in this situation I do tend to do it differently but instantiating it via constructor overloading and making the private field readonly.

e.g. 

public class RoleProvider : RoleProviderBase
{
    private readonly IRoleDataProvider _roleDataProvider;

    public RoleProvider()
       : this(new RoleDataProvider())
    {
    }

    public RoleProvider(IRoleDataProvider roleDataProvider)
    {
        _roleDataProvider = roleDataProvider;
    }
}


Perhaps this question might be better asked on PE as well?