public void SettingExpectationOnIndexer() { IndexerInterface indexer = MockRepository.Mock <IndexerInterface>(); indexer.Expect(x => x["1"]) .Return("First"); Assert.Equal("First", indexer["1"]); indexer.VerifyAllExpectations(); }
public void SettingExpectationOnIndexer() { IndexerInterface indexer = MockRepository.Mock <IndexerInterface>(); indexer.SetUnexpectedBehavior(UnexpectedCallBehaviors.BaseOrDefault); indexer.Expect(x => x["1"]) .Return("First"); Assert.Equal("First", indexer["1"]); indexer.VerifyAllExpectations(); }