I've created a custom equality comparer, and ran the appropriate tests against the comparer.
Now I'm attempting to mock it out so that the class that I am testing that uses the comparer doesn't have to pass in the real thing.
My method call looks like:
left.Except(right, customEqualityComparer);
Where the variables 'left' and 'right' are two lists of any type and customEqualityComparer is my custom equality comparer.
My problem is that I do not know how to mock customEqualityComparer as it has to still act in a realistic way.
I was considering creating a class that contains the method:
public List<object> LeftExceptRight(customEqualityComparer, left, right){}
And mocking the whole method. Is this overkill? I can't see any other alternatives..