public ActionResult GetBirthdays(string apiKey) { var request = new GetBirthdaysRequest { GuildWars2ApiKey = apiKey }; var response = this.getBirthdaysCommand.Execute(request); return(this.RespondWithJson(response.Result)); }
public void CommandWorks() { var request = new GetBirthdaysRequest { GuildWars2ApiKey = this.testKey }; var response = this.SystemUnderTest.Execute(request); Assert.True(response.Success); Assert.NotEmpty(response.Result); this.output.WriteLine($"Command completed in {response.ExecutionTime}ms"); foreach (var character in response.Result) { Assert.NotNull(character.Birthday); Assert.NotNull(character.Name); Assert.NotNull(character.Race); Assert.NotNull(character.Profession); } var json = JsonConvert.SerializeObject(response.Result); this.output.WriteLine("Json: {0}", json); }
public ActionResult GetBirthdays(string apiKey) { var request = new GetBirthdaysRequest { GuildWars2ApiKey = apiKey }; var response = this.getBirthdaysCommand.Execute(request); return this.RespondWithJson(response.Result); }