public void WebRoundTrip(bool nullFields)
        {
            var expected = new NotificationWeb("qc.com",
                                               nullFields ? null : "JijiData",
                                               nullFields ? null : new Dictionary <string, string> {
                { "key", "value" }
            });

            var serialized = JsonConvert.SerializeObject(expected);

            var result = (NotificationWeb)JsonConvert.DeserializeObject <Notification>(serialized);

            Assert.AreEqual(expected.Address, result.Address);
            Assert.AreEqual(expected.Data, result.Data);
            Assert.AreEqual(expected.Headers, result.Headers);
        }
Esempio n. 2
0
 /// <summary>
 /// Send a web REST request notification triggered during live trading from a user algorithm.
 /// </summary>
 /// <param name="notification"></param>
 public void Web(NotificationWeb notification)
 {
     //
 }