private string ValidateRBasePath(string path) { // If path is null, folder selector dialog was canceled if (path != null) { path = RInstallation.NormalizeRPath(path); bool valid = RInstallationHelper.VerifyRIsInstalled(VsAppShell.Current, path, showErrors: !_allowLoadingFromStorage); if (!valid) { path = null; // Prevents assignment of bad values to the property. } } return(path); }
public void NormalizePath(string path, string expected) { RInstallation.NormalizeRPath(path).Should().Be(expected); }