IF.Lastfm/IF.Lastfm.Core.Tests/LastFmTests.cs
2013-06-11 16:03:16 +01:00

28 lines
791 B
C#

using System;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
namespace IF.Lastfm.Core.Tests
{
[TestClass]
public class LastFmTests
{
[TestMethod]
public void ApiUrlFormatReturnsCorrectly()
{
var lastfm = new MockLastFm();
const string expected = "https://ws.audioscrobbler.com/2.0/?method=tobias.funke&api_key=suddenvalley&blue=performance&format=json&uncle=t-bag";
var actual = lastfm.Object.FormatApiUrl("tobias.funke", "suddenvalley", new Dictionary<string, string>
{
{"uncle", "t-bag"},
{"blue", "performance"}
}, true);
Assert.AreEqual(expected, actual);
}
}
}