public void DestroyFriendshipTest()
        {
            const string UserID       = "2";
            const string ScreenName   = "JoeMayo";
            string       expectedName = "Joe Mayo";

            InitializeTwitterContext <User>(SingleUserResponse);

            User actual = ctx.DestroyFriendship(UserID, ScreenName);

            Assert.Equal(expectedName, actual.Name);
        }
Ejemplo n.º 2
0
        public void DestroyFriendshipTest()
        {
            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.DestroyFriendship(id, userID, screenName);

            Assert.AreEqual(expected.Element("name").Value, actual.Name);
        }
Ejemplo n.º 3
0
        private static void DestroyFriendshipDemo(TwitterContext twitterCtx)
        {
            var user = twitterCtx.DestroyFriendship(null, "Linq2Tweeter");

            Console.WriteLine(
                "User Name: {0}, Status: {1}",
                user.Name,
                user.Status.Text);
        }
Ejemplo n.º 4
0
        private static void DestroyFriendshipDemo(TwitterContext twitterCtx)
        {
            var user = twitterCtx.DestroyFriendship("LinqToTweeter", string.Empty, string.Empty);

            Console.WriteLine(
                "User Name: {0}, Status: {1}",
                user.Name,
                user.Status.Text);
        }
Ejemplo n.º 5
0
        public void DestroyFriendshipTest()
        {
            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.DestroyFriendship(id, userID, screenName);

            Assert.AreEqual(expected, actual);
        }