示例#1
0
        public void HelpTestTest()
        {
            XElement expected = XElement.Parse("<ok>False</ok>");

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

            bool actual = m_ctx.HelpTest();

            Assert.AreEqual(bool.Parse(expected.Value), actual);
        }
示例#2
0
        public void HelpTestTest()
        {
            bool expected     = false;
            var  expectedList =
                new List <bool>
            {
                expected
            };

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

            bool actual = m_ctx.HelpTest();

            Assert.AreEqual(expected, actual);
        }
示例#3
0
        /// <summary>
        /// shows how to perform a help test
        /// </summary>
        /// <param name="twitterCtx">TwitterContext</param>
        private static void PerformHelpTest(TwitterContext twitterCtx)
        {
            var helpResult = twitterCtx.HelpTest();

            Console.WriteLine("Test Result: " + helpResult);
        }