Esempio n. 1
0
        public void TestParseResponse()
        {
            var cmd = new GetPlayersCommand();
            cmd.Log = DebugLogger.GetLogger(typeof(GetPlayersCommand));

            var accessor = new PrivateObject(cmd);
            object result = accessor.Invoke("ParseResponse", TestResponse1);

            Assert.IsNotNull(result);
        }
Esempio n. 2
0
        public PlayerResponse[] GetPlayers()
        {
            var command = new GetPlayersCommand(_baseUri);

            return(command.Execute());
        }
Esempio n. 3
0
 public IHttpActionResult Get([FromUri] GetPlayersCommand command)
 {
     return(this.getCommandHanlder.GetPlayers(command)
            .OnBoth(result => result.IsSuccess ? this.Ok(result.Value) : (IHttpActionResult)this.NotFound()));
 }