public void DeleteSubscribeTest()
        {
            SubscriptionServiceImplementation sub = new SubscriptionServiceImplementation()
            {
                _platform = Platform
            };

            sub.AddEvent("/restapi/v1.0/account/~/extension/~/presence");
            sub.AddEvent("/restapi/v1.0/account/~/extension/~/message-store");
            var test = sub.Subscribe(null, null, null);

            Thread.Sleep(500);
            sub.Remove();
            Assert.IsFalse(sub.IsSubscribed());
            Thread.Sleep(500);
        }
        public void SubscribeTest()
        {
            SubscriptionServiceImplementation sub = new SubscriptionServiceImplementation()
            {
                _platform = Platform
            };

            sub.AddEvent("/restapi/v1.0/account/~/extension/~/presence");
            sub.AddEvent("/restapi/v1.0/account/~/extension/~/message-store");
            var subscribed = sub.Subscribe(null, null, null);

            Thread.Sleep(1000);
            Assert.IsNotNull(subscribed);
            Assert.AreEqual(true, subscribed.CheckStatus());
            Assert.IsTrue(sub.IsSubscribed());
            sub.Remove();
            Thread.Sleep(1000);
        }
        public void RenewSubscribeTest()
        {
            SubscriptionServiceImplementation sub = new SubscriptionServiceImplementation()
            {
                _platform = Platform
            };

            sub.AddEvent("/restapi/v1.0/account/~/extension/~/presence");
            sub.AddEvent("/restapi/v1.0/account/~/extension/~/message-store");
            var test = sub.Subscribe(null, null, null);

            Thread.Sleep(500);
            sub.ClearEvents();
            sub.SetEvents(new List <string>()
            {
                "/restapi/v1.0/account/~/extension/~/presence"
            });
            sub.Renew();
            Assert.IsTrue(sub.IsSubscribed());
            sub.Remove();
            Thread.Sleep(500);
        }