public void GetEnumerator_Method() { var entity = new TestEntity(); using (var repository = new MemoryRepository <TestEntity>()) { Assert.False(repository.GetEnumerator().MoveNext()); repository.Transaction(() => repository.Persist(entity)); var enumerator = repository.GetEnumerator(); Assert.True(enumerator.MoveNext()); Assert.False(enumerator.MoveNext()); } }