public void When_enumerating_after_disposal_it_should_fail()
        {
            // Arrange
            DelimitedValuesReader reader = new DelimitedValuesReaderBuilder().Build();

            reader.Dispose();

            // Act
            Action action = () => _ = reader.TakeWhile(_ => true).ToArray();

            // Assert
            action.Should().ThrowExactly <ObjectDisposedException>();
        }
        public void When_accessing_line_after_disposal_it_should_fail()
        {
            // Arrange
            DelimitedValuesReader reader = new DelimitedValuesReaderBuilder().Build();

            reader.Dispose();

            // Act
            Action action = () => _ = reader.Line;

            // Assert
            action.Should().ThrowExactly <ObjectDisposedException>();
        }
        public void When_enumerating_after_disposal_it_should_fail()
        {
            // Arrange
            DelimitedValuesReader reader = new DelimitedValuesReaderBuilder().Build();
            reader.Dispose();

            // Act
            // ReSharper disable once ReturnValueOfPureMethodIsNotUsed
            // ReSharper disable once ConvertToLambdaExpression
            Action action = () => { reader.TakeWhile(x => true).ToArray(); };

            // Assert
            action.ShouldThrow<ObjectDisposedException>();
        }
        public void When_accessing_line_after_disposal_it_should_fail()
        {
            // Arrange
            DelimitedValuesReader reader = new DelimitedValuesReaderBuilder().Build();
            reader.Dispose();

            // Act
            Action action = () =>
            {
                // ReSharper disable once UnusedVariable
                string dummy = reader.Line;
            };

            // Assert
            action.ShouldThrow<ObjectDisposedException>();
        }