I have a method as below that uses a static method from NamaspaceManager class.
public long GetCount(string name)
{
var namespaceManager = NamespaceManager.CreateFromConnectionString(this.queueConfig.ConnectionString);
return namespaceManager.GetQueue(name).MessageCountDetails.ActiveMessageCount;
}
Since the function has hard dependency on NamespaceManager class, during unit tetsing, it expects me to provide a valid connection string. Also, I don't have any control over the NamespaceManager class as it comes with NuGet package. How do I refactor it to make it unit testable?