public void WriteTest()
        {
            string      filename     = "onerecord.xml";
            string      testFilename = "onerecord_test.xml";
            string      source       = File.ReadAllText(filename);
            FileMARCXML targetXML    = new FileMARCXML(source);
            Record      record       = targetXML[0];

            using (FileMARCXMLWriter target = new FileMARCXMLWriter(testFilename))
            {
                target.Write(record);
            }

            string expected = source;
            string actual   = File.ReadAllText(testFilename);

            Assert.AreEqual(expected, actual);
        }
        public void WriteTest1()
        {
            string        filename     = "music.xml";
            string        testFilename = "music_test.xml";
            string        source       = File.ReadAllText(filename);
            FileMARCXML   targetXML    = new FileMARCXML(source);
            List <Record> records      = new List <Record>();

            foreach (Record record in targetXML)
            {
                records.Add(record);
            }

            using (FileMARCXMLWriter target = new FileMARCXMLWriter(testFilename))
            {
                target.Write(records);
            }

            string expected = source;
            string actual   = File.ReadAllText(testFilename);

            Assert.AreEqual(expected, actual);
        }