I am making my own abstraction layer to utilise version 2.0 beta of the .NET SDK.
I noticed one of the key interfaces, ICouchbaseCluser is internal to the core namespace and the class which inherits this is also a sealed class?
I can’t unit test the functionality properly which utilises this interface/class, even using Mocking Frameworks, as they require an interface or abstract class, which both are inaccessible to my testing namespace.
I have tried creating my own cluster class using inheritance but Cluster is a sealed class, and again, I can’t access the internal interface to do it that way either.
As you have probably guessed this was not done by accident! That being said, I completely understand your dilemma; how to mock the root object? The problem is that in any public API certain things should be exposed and available and other things are better left abstracted/encapsulated from the user of the API. Early on I made this internal, but I think your right it might be a better as a public interface given your feedback.
Note the test project (Couchbase.Tests) is a friend assembly and the ICouchbaseCluster (another note: expect a name change to ICluster before GA) interface can be mocked from there (a weak attempt at soliciting a contribution to the project ;)).