public void WhenContainsNull_ThrowsException() { var enumerable = new [] { new object(), null, new object() }; Assert.Throws <ArgumentException>( () => RequireThat.DoesNotContainNull(enumerable, "name")); }
public void WhenNull_ThrowsException() { Assert.Throws <ArgumentNullException>( () => RequireThat.DoesNotContainNull(null as IEnumerable, "name")); }
public void WhenContainsNoNull_DoesNotThrow() { var enumerable = new[] { new object(), new object() }; RequireThat.DoesNotContainNull(enumerable, "name"); }