Exemplo n.º 1
0
        public void GetEnumerator()
        {
            using (IEnumerator <DomainObject> fakeEnumerator = new List <DomainObject> ().GetEnumerator())
            {
                _wrappedDataMock.Expect(mock => mock.GetEnumerator()).Return(fakeEnumerator);
                _wrappedDataMock.Replay();

                var result = _decorator.GetEnumerator();

                _wrappedDataMock.VerifyAllExpectations();
                Assert.That(result, Is.SameAs(fakeEnumerator));
            }
        }