CmdletUnitTest.TestRunspace.RunAndEvaluateIsTrue C# (CSharp) Méthode

RunAndEvaluateIsTrue() public static méthode

public static RunAndEvaluateIsTrue ( string codeSnippet, string strValue ) : void
codeSnippet string
strValue string
Résultat 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();
        }