using System;
using System.Diagnostics;
using System.IO;
using id3;

namespace m3uTool.Tests
{
	/// <summary>
	/// Summary description for MP3HeaderTests.
	/// </summary>
	public class MP3HeaderTests
	{
		private string mp3File1 = "001-22.mp3";
		private string mp3File2 = "001-44.mp3";
		
		public void MP3HeaderTest()
		{
			string mp3Filename = mp3File1;
			MP3Header mp3hdr = new MP3Header();
			bool boolIsMP3 = mp3hdr.ReadMP3Information(mp3Filename);
			if(boolIsMP3)
			{
				Debug.WriteLine(mp3hdr.strFileName);
				Debug.WriteLine(mp3hdr.lngFileSize.ToString());
				Debug.WriteLine(mp3hdr.intBitRate.ToString());
				Debug.WriteLine(mp3hdr.intFrequency.ToString());
				Debug.WriteLine(mp3hdr.strMode);
				Debug.WriteLine(mp3hdr.strLengthFormatted);
				Debug.WriteLine(mp3hdr.intLength.ToString());
			}

			FileInfo fFileInfo = new FileInfo(mp3Filename); // Creating this FileInfo so I don't have to change my generic class
			MP3 mp3ID3  = new MP3(fFileInfo.DirectoryName, fFileInfo.Name); //fFile.DirectoryName, fFile.Name);
            FileCommands.readMP3Tag(ref mp3ID3);

            Debug.WriteLine(mp3ID3.id3Title);
			Debug.WriteLine(mp3ID3.id3Artist);
			Debug.WriteLine(mp3ID3.id3Album);
			Debug.WriteLine(mp3ID3.id3TrackNumber);
		}
	}
}
