public void TestEnumerate() { var item1 = new Mock <IDisposable>(); var item2 = new Mock <IDisposable>(); var item3 = new Mock <IDisposable>(); var item4 = new Mock <IDisposable>(); var item5 = new Mock <IDisposable>(); var target = new CombinedDisposables(reverse: true, removeDispose: false); target.Add(item1.Object); target.Add(item2.Object); target.Add(item3.Object); target.Add(item4.Object); target.Add(item5.Object); target.AsEnumerable().Should().Equal( item1.Object, item2.Object, item3.Object, item4.Object, item5.Object ); // for Un generic enumeration var ungeneric = new List <object>(); foreach (var obj in ((System.Collections.IEnumerable)target)) { ungeneric.Add(obj); } ungeneric.Should().Equal( item1.Object, item2.Object, item3.Object, item4.Object, item5.Object ); }