このコードが演算子で ShimNotSupportedException をスローするのはなぜですか?
ShimStreamReader.AllInstances.EndOfStreamGet = ((s)=>calls < 1);
[TestMethod]
public void GetAllLinesFromFile__()
{
int calls = 0;
using (ShimsContext.Create())
{
ShimStreamReader.AllInstances.EndOfStreamGet = ((s)=>calls < 1);
ShimStreamReader.AllInstances.ReadLine = (s) =>
{
calls++;
return ";;;;;;;;;;";
};
var streamFake = new ShimStreamReader();
var obj = new MyFile(streamFake, ';');
Assert.IsTrue(obj.GetAllLinesFromFile().Count() == 1);
}
}