So I've found the answer:
var fakeItem = new ShimSPListItem()
{
//delegates in here
};
MethodUnderTest(fakeItem);
var item=fakeListItem as SPListItem;
Assert.AreEqual(item["someField"], expected, "Field value was not set correctly");
This doesn't work - I can't convert fakeListItem to an SPListItem using 'as'. Thinking about it this makes sense since the shim isn't actually derived from an SPListItem instead it's a pile of delegates that can be hooked up to an SPListTem by the fakes framework.
This does work:
var fakeItem = new ShimSPListItem()
{
//delegates in here
};
MethodUnderTest(fakeItem);
var item=(SPListItem) fakeListItem;
Assert.AreEqual(item["someField"], expected, "Field value was not set correctly");
Presumably the cast allows a custom converter to run giving us what we need.
A slightly easier to work with for TypeMock migrators might be:
SPListItem fakeItem = new ShimSPListItem()
{
//delegates in here
};
MethodUnderTest(fakeItem);
Assert.AreEqual(fakeListItem["someField"], expected, "Field value was not set correctly");