public void Given_service_by_default()
 {
     _broker = new CommandBrokerStub();
     var service = new CommandsService(new ServerContext(broker: _broker));
     var cmdKey = typeof (FooCommand).FullName;
     var cmdContent = new StringContent("Zaz-Command-Id=" + cmdKey + "&Value1=Foo");
     cmdContent.Headers.ContentType = new MediaTypeHeaderValue("application/x-www-form-urlencoded");
     var cmdMessage = new HttpRequestMessage
         {
             Content = cmdContent
         };
     _result = service.PostLegacy(cmdMessage);
 }
 public void Given_service_by_default()
 {
     _broker = new CommandBrokerStub();
     var service = new CommandsService(new ServerContext (broker: _broker ));
     var cmdKey = typeof (FooCommand).FullName;
     var cmdData = new JObject();
     cmdData.Add("Value1", "Foo");
     _result = service.Post(new PostCommandRequest
     {
         Key = cmdKey,
         Command = cmdData
     });
 }