Not sure if this is the actual reason, but what if your custom IComparer
was faulty - your unit test would be meaningless (bearing in mind that the test framework has no way to tell if you wrote unit tests for it let alone if they are "correct")
Could you just create a comparer in your test?
var com = new MyComparer<Foo>();
int expected=0;
int actual = com.Compare(a,b);
if (actual!=0)
{
Assert.Fail("oops");
}
Maybe not ideal, but should work... I also found this question from a few years ago on msdn, with no answers - but an interesting approach to the workaround by the question poster.