I happen to like your fix for making it testable, but would reverse the implementation order between the static method and the explicit interface method. This will allow you to slowly change existing code first to use the Singleton instead of the static and then finally use an injectable pattern:
public interface IHelperClass
{
bool ReturnSomething();
}
public sealed class HelperClass : IHelperClass
{
private static readonly IHelperClass instance = new HelperClass();
private HelperClass()
{
}
public static IHelperClass Instance
{
get
{
return instance;
}
}
[Obsolete("Use the Instance singleton's implementation instead of this static method.")]
public static bool ReturnSomething()
{
return Instance.ReturnSomething(); // Simply calls the Singleton's instance of the method.
}
bool IHelperClass.ReturnSomething()
{
return true; // The original static ReturnSomething logic now goes here.
}
}