public void DisposeHasExpectedResult()
        {
            var expectedHeader = _fixture.Create <DbaseFileHeader>();

            using (var stream = new MemoryStream())
            {
                using (var writer = new BinaryWriter(stream, Encoding.ASCII, false))
                    using (var sut = new DbaseBinaryWriter(expectedHeader, writer))
                    {
                        //Act
                        sut.Dispose();
                        Assert.Throws <ObjectDisposedException>(() => writer.Write(_fixture.Create <byte>()));
                    }
            }
        }
        public void WritManyWhenDisposedHasExpectedResult()
        {
            var expectedHeader = _fixture.Create <DbaseFileHeader>();
            var records        = _fixture.GenerateDbaseRecords(expectedHeader.Schema.Fields, expectedHeader.RecordCount);

            using (var stream = new MemoryStream())
            {
                using (var writer = new BinaryWriter(stream, Encoding.ASCII, true))
                    using (var sut = new DbaseBinaryWriter(expectedHeader, writer))
                    {
                        //Act
                        sut.Dispose();
                        Assert.Throws <ObjectDisposedException>(() => sut.Write(records));
                    }
            }
        }