public GetGenderStatsCommandResults GenderStats(string accesstoken, int placeId) { var cmd = new GetGenderStatsCommand() { Args = new GetGenderStatsCommandArgs() { Date = DateTimeOffset.Now, MinutesDifference = Int32.Parse(ConfigurationManager.AppSettings["minutesBetweenMatches"]), AccessToken = accesstoken, PlaceId = placeId } }; Runner.RunCommand(ref cmd); return cmd.Results; }
public void ExecuteTest() { var mockArgs = new CommandArgs.GetGenderStatsCommandArgs() { AccessToken = "CAAV4JtLrzl8BAKUBHdijYMIFZBgHuN6JZCtrWbIpdP8gdu2SDDBKJAJtBTtkzNg3FDCiiIkpZCXP1or3YpqAMP8qGWrVbbBEcOJYN6ZBhLfZBZBtnZBZAuRlI5cx6BV5VkCpZCTV8g8NpeZCZCWD3lnZBCYY98IrqRdqvAyC84iFfUHhIsXZBSoRCXRzEwH8zkZAV9ay7hojqsTbAdX2vebTpZADyhS8wFLf8HZAk7gZD", Date = DateTimeOffset.Now, MinutesDifference = 30, PlaceId = 2 }; var cmd = new GetGenderStatsCommand() { Args = mockArgs }; cmd.Execute(); var res = cmd.Results; Assert.AreEqual(mockArgs.MinutesDifference, res.MinutesRequest); }