public void TestInitialise() { _mockAuth = new Mock <ILastAuth>(); _command = new GetWeeklyAlbumChartCommand(_mockAuth.Object, user) { From = 1234, To = 5678 }; _command.SetParameters(); }
public async Task <PageResponse <LastAlbum> > GetWeeklyAlbumChartAsync(string username, double?from = null, double?to = null) { var command = new GetWeeklyAlbumChartCommand(auth: Auth, username: username) { From = from, To = to, HttpClient = HttpClient }; return(await command.ExecuteAsync()); }
public void CorrectParametersNoToFrom() { var expected = new Dictionary <string, string> { { "user", user }, { "disablecachetoken", "" } }; GetWeeklyAlbumChartCommand _command2 = new GetWeeklyAlbumChartCommand(_mockAuth.Object, user) { //no parameters }; _command2.SetParameters(); _command2.Parameters["disablecachetoken"] = ""; TestHelper.AssertSerialiseEqual(expected, _command2.Parameters); }