public void TestMethod1()
        {
            var obj = new { value = 1, timestamp = DateTime.Now };

            var pusher = new PusherHelper();
                pusher.Push("testChannel", "testUpdate", obj);
        }
예제 #2
0
        public void PusherIntegrationSmokeTest()
        {
#if FALSE
            Func <Pusher> factory = () => new Pusher(IntegrationTestUrl.PusherApiKey);

            var result = PusherHelper.Connect <Dictionary <string, object> >(factory, "now_playing_updates", "update_now_playing")
                         .Timeout(TimeSpan.FromMinutes(4.0), RxApp.TaskpoolScheduler)
                         .Take(1)

                         /*
                          * .Select(x =>
                          *  new Tuple<Song, List<Song>>(
                          *      JsonConvert.DeserializeObject<Song>(x["now_playing"].ToString()),
                          *      JsonConvert.DeserializeObject<SongQueue>(x["songs"].ToString()).songs))
                          */
                         .First();

            result.Should().NotBeNull();
#endif
        }