public void AsMARC21() { TextReader marcRecord = new StreamReader(@"C:\Documents and Settings\wkurt\My Documents\Visual Studio 2008\Projects\TestMARC\TestMARC\makrtest.mrc"); string marcTransmission = marcRecord.ReadToEnd(); MARCRecord testRecord = new MARCRecord(marcTransmission);//decode should happen automatically here //right now I cannot check the header info Assert.True(marcTransmission.Contains(testRecord.AsMARC21())); marcRecord.Close(); TextReader singleMarcRecord = new StreamReader(@"C:\Documents and Settings\wkurt\My Documents\Visual Studio 2008\Projects\TestMARC\TestMARC\one.dat"); string singleMarc = singleMarcRecord.ReadToEnd(); MARCRecord singleTest = new MARCRecord(singleMarc); Assert.Equals(singleMarc, singleTest.AsMARC21()); singleMarcRecord.Close(); }
public virtual void Write(MARCRecord record) { this.fileStream.Write(record.AsMARC21()); }