Example #1
0
 public void TestInitialise()
 {
     _mockAuth = new Mock <ILastAuth>();
     _command  = new GetWeeklyTrackChartCommand(_mockAuth.Object, user)
     {
         From = 1234,
         To   = 5678
     };
     _command.SetParameters();
 }
Example #2
0
        public async Task <PageResponse <LastTrack> > GetWeeklyTrackChartAsync(string username, double?from = null, double?to = null)
        {
            var command = new GetWeeklyTrackChartCommand(auth: Auth, username: username)
            {
                From       = from,
                To         = to,
                HttpClient = HttpClient
            };

            return(await command.ExecuteAsync());
        }
Example #3
0
        public void CorrectParametersNoToFrom()
        {
            var expected = new Dictionary <string, string>
            {
                { "user", user },
                { "disablecachetoken", "" }
            };

            GetWeeklyTrackChartCommand _command2 = new GetWeeklyTrackChartCommand(_mockAuth.Object, user)
            {
                //no parameters
            };

            _command2.SetParameters();
            _command2.Parameters["disablecachetoken"] = "";

            TestHelper.AssertSerialiseEqual(expected, _command2.Parameters);
        }