Exemplo n.º 1
0
        public void DisableNotificationsTest()
        {
            string   id         = "1";
            string   userID     = "2";
            string   screenName = "JoeMayo";
            XElement expected   = XElement.Parse(m_testUserQueryResponse);

            Expect.Once.On(m_twitterExecute)
            .Method("ExecuteTwitter")
            .Will(Return.Value(expected));

            User actual = m_ctx.DisableNotifications(id, userID, screenName);

            Assert.AreEqual(expected.Element("name").Value, actual.Name);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Shows how to do a Notifications Leave
        /// </summary>
        /// <param name="twitterCtx">TwitterContext</param>
        private static void DisableNotificationsDemo(TwitterContext twitterCtx)
        {
            var user = twitterCtx.DisableNotifications("15411837", null, null);

            if (user == null)
            {
                return;
            }

            Console.WriteLine("User Name: " + user.Name);
        }
Exemplo n.º 3
0
        public void DisableNotificationsTest()
        {
            string id           = "1";
            string userID       = "2";
            string screenName   = "JoeMayo";
            User   expected     = new User();
            var    expectedList =
                new List <User>
            {
                expected
            };

            Expect.Once.On(m_twitterExecute)
            .Method("ExecuteTwitter")
            .Will(Return.Value(expectedList));

            User actual = m_ctx.DisableNotifications(id, userID, screenName);

            Assert.AreEqual(expected, actual);
        }