Пример #1
0
        public void DestroyFavoriteTest()
        {
            string   id       = "1";
            XElement expected = XElement.Parse(m_testStatusQueryResponse);

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

            Status actual = m_ctx.DestroyFavorite(id);

            Assert.AreEqual(expected.Element("status").Element("id").Value, actual.StatusID);
        }
Пример #2
0
        public void DestroyFavoriteTest()
        {
            string id           = "1";
            Status expected     = new Status();
            var    expectedList =
                new List <Status>
            {
                expected
            };

            Expect.Once.On(m_twitterExecute)
            .Method("ExecuteTwitter")
            .Will(Return.Value(expectedList));
            Status actual = m_ctx.DestroyFavorite(id);

            Assert.AreEqual(expected, actual);
        }
Пример #3
0
        private static void DestroyFavoriteDemo(TwitterContext twitterCtx)
        {
            var status = twitterCtx.DestroyFavorite("265675496581373952", true);

            Console.WriteLine("User: {0}, Tweet: {1}", status.User.Name, status.Text);
        }
Пример #4
0
        private static void DestroyFavoriteDemo(TwitterContext twitterCtx)
        {
            var status = twitterCtx.DestroyFavorite("1552797863");

            Console.WriteLine("User: {0}, Tweet: {1}", status.User.Name, status.Text);
        }