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); }
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); }
/// <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); }