Most or all of Endeca's objects have internal constructors. I'm working on a good project that lacks great test coverage around the Endeca API, are there any good strategies to unit testing the interactions with Endeca?
So far the best we have is kind of a poor man's adapter pattern:
public class DimValue : IDimValue
{
public DimValue(Dimension dim, DimVal dimValue)
{
Dimension = dim;
Value = dimValue;
}
public virtual bool IsNavigable()
{
return Value.IsNavigable();
}
public virtual long Id()
{
return Value.Id;
}
// and so on...
}
We can then mock our own type, DimValue. Is this the best way to keep their API as testable as can be? Or is there another method that is preferred to this?