Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Visual Studio 2010 の単体テスト内から IEnumerable を返すメソッドを呼び出す方法を知りたいです。フレームワークをモックする rhino モックを使用しています。
このようなものがあなたが探しているものでなければなりません:
var expectedDatasets = new List<Dataset>{new Dataset()}; Expect.Call(service.FindDatasets()).Return(expectedDatasets);
List は IEnumerable インターフェースを実装しているので、それを期待していると言うことができます。