private static object GetMSpecRunListener(SessionResults sessionResults) { var specificationRunListenerType = MSpecTypes.Types.First(x => x.Name == "ISpecificationRunListener"); return(Impromptu.DynamicActLike(GilesMSpecRunListener.GetAnonymousListener(sessionResults, new List <TestResult>(), new ResultFormatterFactory()), specificationRunListenerType)); }
public SessionResults RunAssembly(Assembly assembly) { var runListener = new GilesMSpecRunListener(); var runner = new AppDomainRunner(runListener, RunOptions.Default); runner.RunAssembly(assembly); return runListener.SessionResults; }