public void LazyChildrenChildrenAccessThrowErrorIfNoParentAttached(IList <IMetadataObject> values) { // Act var sut = new LazyChildren <IMetadataObject>(values.ToImmutableList()); // Assert Assert.Throws <NotSupportedException>(() => sut.GetEnumerator()); }
public void LazyChildrenThrowsErrorIfLambdaReturnsNull(IMetadataObject parent) { // Act var sut = new LazyChildren <IMetadataObject>(_ => null); sut.AttachToParent(parent); // Assert Assert.Throws <NotSupportedException>(() => sut.GetEnumerator()); }