Ejemplo n.º 1
0
        public void TestXmcdFileParsing()
        {
            XmcdDecoder decoder = new XmcdDecoder();

            for (int index = 0; index < exampleFile.Length; ++index)
            {
                decoder.ProcessLine(exampleFile[index]);
            }

            Cddb.DatabaseEntry entry = decoder.ToDatabaseEntry();

            Assert.AreEqual(2, entry.TrackFrameOffsets.Length);
            Assert.AreEqual(150, entry.TrackFrameOffsets[0]);
            Assert.AreEqual(210627, entry.TrackFrameOffsets[1]);

            Assert.AreEqual(2952, entry.DiscLengthSeconds);

            Assert.AreEqual(1, entry.Revision);

            Assert.AreEqual("xmcd 2.0", entry.Submitter);

            Assert.AreEqual(1, entry.DiscIds.Length);
            Assert.AreEqual(0x270b8617, entry.DiscIds[0]);

            Assert.AreEqual("Franske Stemninger", entry.Artist);
            Assert.AreEqual("Con Spirito", entry.Album);

            Assert.AreEqual(1981, entry.Year);

            Assert.AreEqual("Classical", entry.Genre);

            Assert.AreEqual(23, entry.Tracks.Length);
            Assert.AreEqual("Mille regretz de vous abandonner", entry.Tracks[0].Title);
            Assert.AreEqual("L'arche de no", entry.Tracks[22].Title);
        }
Ejemplo n.º 2
0
    public void TestXmcdFileParsing() {
      XmcdDecoder decoder = new XmcdDecoder();
      for(int index = 0; index < exampleFile.Length; ++index) {
        decoder.ProcessLine(exampleFile[index]);
      }

      Cddb.DatabaseEntry entry = decoder.ToDatabaseEntry();

      Assert.AreEqual(2, entry.TrackFrameOffsets.Length);
      Assert.AreEqual(150, entry.TrackFrameOffsets[0]);
      Assert.AreEqual(210627, entry.TrackFrameOffsets[1]);

      Assert.AreEqual(2952, entry.DiscLengthSeconds);

      Assert.AreEqual(1, entry.Revision);

      Assert.AreEqual("xmcd 2.0", entry.Submitter);

      Assert.AreEqual(1, entry.DiscIds.Length);
      Assert.AreEqual(0x270b8617, entry.DiscIds[0]);

      Assert.AreEqual("Franske Stemninger", entry.Artist);
      Assert.AreEqual("Con Spirito", entry.Album);

      Assert.AreEqual(1981, entry.Year);

      Assert.AreEqual("Classical", entry.Genre);

      Assert.AreEqual(23, entry.Tracks.Length);
      Assert.AreEqual("Mille regretz de vous abandonner", entry.Tracks[0].Title);
      Assert.AreEqual("L'arche de no", entry.Tracks[22].Title);
    }