예제 #1
0
        public void testCommandExecuteWithWrongParameters1()
        {
            testcmd.checkNumberOfParametersReturnValue = false;
            commandInvoker.ExecuteCommand("dir param1 param2", output);

            Assert.IsTrue(testcmd.executed == false);
            Assert.IsTrue(testcmd.getParams().Count == 2);
            Assert.IsTrue(testcmd.numberOfParamsPassed == 2);
            Assert.IsTrue(output.ToString().ToLower().Contains("wrong"));
            Assert.IsTrue(output.ToString().ToLower().Contains("parameter"));
        }
예제 #2
0
        /// <summary>
        /// Called when the test creates text output.
        /// </summary>
        /// <param name="testOutput">A console message</param>
        public void TestOutput(TestOutput testOutput)
        {
            try
            {
#if false
                string report = string.Format("<output type=\"{0}\"><text>{1}</text></output>",
                                              testOutput.Type, testOutput.Text);

                handler.RaiseCallbackEvent(report);
#else
                handler.RaiseCallbackEvent(testOutput.ToXml(false).OuterXml);
#endif
            }
            catch (Exception ex)
            {
                log.Error("Exception processing: " + testOutput.ToString() + NUnit.Env.NewLine + ex.ToString());
            }
        }
예제 #3
0
 public static void AssertOutputIsEmpty(TestOutput testOutput)
 {
     Assert.IsNotNull(testOutput);
     Assert.AreEqual(0, testOutput.ToString().Length);
 }
예제 #4
0
 public void TestOutput(TestOutput testOutput)
 {
     _log.Info("Test output: " + testOutput.ToString());
 }