public void When_IsNullOrEmpty_is_called_with_a_empty_ICollection_as_IEnumerable() { // Arrange. IEnumerable <object> objects = new WeirdClassThatImplementsGenericIEnumerableButNonGenericICollection(); // Act. bool result = objects.IsNullOrEmpty(); // Assert. result.Should().BeTrue(); }
public void When_IsNotEmpty_is_called_with_a_empty_ICollection_as_IEnumerable() { // Arrange. IEnumerable <object> objects = new WeirdClassThatImplementsGenericIEnumerableButNonGenericICollection(); // Act. Action action = () => Ensure.Arg(objects).IsNotNullOrEmpty(); // Assert. action.ShouldThrow <ArgumentException>(); }