private void Run(string vimRcText) { var lines = vimRcText.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); _fileSystem.Setup(x => x.LoadVimRcContents()).Returns(new FSharpOption <FileContents>(new FileContents("_vimrc", lines))); Assert.True(Vim.LoadVimRc().IsLoadSucceeded); }
private void RunNone() { _fileSystem .Setup(x => x.GetVimRcFilePaths()) .Returns(new VimRcPath[] { }); Assert.True(Vim.LoadVimRc().IsLoadFailed); }
private void Run(string vimRcText) { var vimRcPath = new VimRcPath(VimRcKind.VimRc, "_vimrc"); var lines = vimRcText.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); _fileSystem .Setup(x => x.GetVimRcFilePaths()) .Returns(new[] { vimRcPath }); _fileSystem .Setup(x => x.ReadAllLines(vimRcPath.FilePath)) .Returns(FSharpOption.Create(lines)); Assert.True(Vim.LoadVimRc().IsLoadSucceeded); }
private void RunNone() { _fileSystem.Setup(x => x.LoadVimRcContents()).Returns(FSharpOption <FileContents> .None); Assert.True(Vim.LoadVimRc().IsLoadFailed); }