mirror of
https://github.com/Sarsoo/IF.Lastfm.git
synced 2024-10-16 23:13:07 +01:00
Merge pull request #140 from klinge/feature/128-ArtistGetInfo-add-lang-param
Issue 128 - Added lang param to Artist.GetInfo
This commit is contained in:
commit
e2511d19a6
@ -126,6 +126,23 @@ public async Task HandleSuccessResponse()
|
|||||||
Assert.AreEqual(expectedJson, actualJson, expectedJson.DifferencesTo(actualJson));
|
Assert.AreEqual(expectedJson, actualJson, expectedJson.DifferencesTo(actualJson));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void ArtistGetInfo_SetLangParam_Success()
|
||||||
|
{
|
||||||
|
GetInfoCommand _command2 = new GetInfoCommand(MAuth.Object)
|
||||||
|
{
|
||||||
|
ArtistName = "Frightened Rabbit",
|
||||||
|
BioLanguage = "fr"
|
||||||
|
};
|
||||||
|
|
||||||
|
//call the commands SetParameter method - this is ususally done in Command.ExecuteAsync
|
||||||
|
_command2.SetParameters();
|
||||||
|
|
||||||
|
string langValue;
|
||||||
|
Assert.IsTrue(_command2.Parameters.TryGetValue("lang", out langValue));
|
||||||
|
Assert.AreEqual("fr", langValue);
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public async Task HandleErrorResponse()
|
public async Task HandleErrorResponse()
|
||||||
{
|
{
|
||||||
|
@ -36,6 +36,11 @@ public override void SetParameters()
|
|||||||
Parameters.Add("artist", ArtistName);
|
Parameters.Add("artist", ArtistName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (BioLanguage != null)
|
||||||
|
{
|
||||||
|
Parameters.Add("lang", BioLanguage);
|
||||||
|
}
|
||||||
|
|
||||||
Parameters.Add("autocorrect", Convert.ToInt32(Autocorrect).ToString());
|
Parameters.Add("autocorrect", Convert.ToInt32(Autocorrect).ToString());
|
||||||
|
|
||||||
DisableCaching();
|
DisableCaching();
|
||||||
|
Loading…
Reference in New Issue
Block a user