public static void RunAndCompareTwoOutputs(
string codeSnippet,
List<int> sourceIndices,
List<int> targetIndices)
{
//reportRunningCode(codeSnippet);
var coll = PSRunner.Runner.RunPSCode(codeSnippet, showCode);
var sourceList = new List<object>();
foreach (int i in sourceIndices)
sourceList.Add(coll[i]);
var targetList = new List<object>();
foreach (int i in targetIndices)
targetList.Add(coll[i]);
Assert.AreEqual(sourceList, targetList);
PSRunner.Runner.FinishRunningCode();
}