using System.Xml;
using MusicMetaTagger.Client.AllMusicGuide.RemoteDataAccess.Parser;
using MusicMetaTagger.Core.Model;
using NUnit.Framework;

namespace MusicMetaTagger.Client.AllMusicGuide.Tests.RemoteDataAccess.Parser
{
	[TestFixture]
	public class ArtistParserTests
	{
		private Artist _artist;

		[SetUp]
		public void SetUp()
		{
			var artistDoc = new XmlDocument();
			artistDoc.Load("Artist-Spoon.xml");

			_artist = new ArtistParser().Parse(artistDoc);
		}

		[Test]
		public void ArtistInfoTestSuite()
		{
			Assert.AreEqual("mn0000131038", _artist.ArtistId);
			Assert.AreEqual("Pop/Rock", _artist.Genre);
			Assert.Less(1, _artist.Styles.Count);
			SerializationTester.AssertBinarySerializable(_artist);
		}
	}
}