public CreateSessionAsync ( ) : System.Threading.Tasks.Task | ||
Результат | System.Threading.Tasks.Task |
public async Task BuildPackageIndexTest() { string[] packageNames = { "base", "boot", "class", "cluster", "codetools", "compiler", "datasets", "foreign", "graphics", "grDevices", "grid", "KernSmooth", "lattice", "MASS", "Matrix", "methods", "mgcv", "nlme", "nnet", "parallel", "rpart", "spatial", "splines", "stats", "stats4", "survival", "tcltk", "tools", "translations", "utils", }; IPackageIndex packageIndex; using (var host = new IntelliSenseRSession(_shell, _workflowProvider)) { await host.CreateSessionAsync(); var functionIndex = new FunctionIndex(_shell, null, host); packageIndex = new PackageIndex(_workflowProvider, _shell, host, functionIndex); await packageIndex.BuildIndexAsync(); } foreach (var name in packageNames) { IPackageInfo pi = await packageIndex.GetPackageInfoAsync(name); pi.Should().NotBeNull(); pi.Name.Should().Be(name); } }
public async Task PackageDescriptionTest() { RToolsSettings.Current = new TestRToolsSettings(); PackageIndex packageIndex; using (var host = new IntelliSenseRSession(_shell, _workflowProvider)) { await host.CreateSessionAsync(); var functionIndex = new FunctionIndex(_shell, null, host); packageIndex = new PackageIndex(_workflowProvider, _shell, host, functionIndex); await packageIndex.BuildIndexAsync(); } IPackageInfo pi = await packageIndex.GetPackageInfoAsync("base"); pi.Description.Should().Be("Base R functions."); }