CmdletUnitTest.TestRunspace.RunAndEvaluateIsTrue C# (CSharp) Method

RunAndEvaluateIsTrue() public static method

public static RunAndEvaluateIsTrue ( string codeSnippet, string strValue ) : void
codeSnippet string
strValue string
return void
        public static void RunAndEvaluateIsTrue(
            string codeSnippet,
            string strValue)
        {
            //reportRunningCode(codeSnippet);
            var coll = PSRunner.Runner.RunPSCode(codeSnippet, showCode);
            Assert.IsTrue(coll[0].ToString() == strValue);
            PSRunner.Runner.FinishRunningCode();
        }