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
@ -125,6 +125,23 @@ public async Task HandleSuccessResponse()
|
||||
|
||||
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]
|
||||
public async Task HandleErrorResponse()
|
||||
|
@ -35,7 +35,12 @@ public override void SetParameters()
|
||||
{
|
||||
Parameters.Add("artist", ArtistName);
|
||||
}
|
||||
|
||||
|
||||
if (BioLanguage != null)
|
||||
{
|
||||
Parameters.Add("lang", BioLanguage);
|
||||
}
|
||||
|
||||
Parameters.Add("autocorrect", Convert.ToInt32(Autocorrect).ToString());
|
||||
|
||||
DisableCaching();
|
||||
|
Loading…
Reference in New Issue
Block a user