コード例 #1
0
ファイル: ToolsController.cs プロジェクト: devsull/GW2-Tools
        public ActionResult GetBirthdays(string apiKey)
        {
            var request = new GetBirthdaysRequest {
                GuildWars2ApiKey = apiKey
            };
            var response = this.getBirthdaysCommand.Execute(request);

            return(this.RespondWithJson(response.Result));
        }
コード例 #2
0
        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);
        }
コード例 #3
0
ファイル: ToolsController.cs プロジェクト: devsull/GW2-Tools
        public ActionResult GetBirthdays(string apiKey)
        {
            var request = new GetBirthdaysRequest { GuildWars2ApiKey = apiKey };
            var response = this.getBirthdaysCommand.Execute(request);

            return this.RespondWithJson(response.Result);
        }