public void GivenManifestFileOnSameDirectoryItThrowsWhenTheManifestFileCannotBeFound() { var toolManifest = new ToolManifestFinder(new DirectoryPath(_testDirectoryRoot), _fileSystem); Action a = () => toolManifest.FindFirst(); a.ShouldThrow <ToolManifestCannotBeFoundException>().And.Message.Should() .Contain(string.Format(LocalizableStrings.CannotFindAnyManifestsFileSearched, "")); }
public void GivenManifestFileOnSameDirectoryItDoesNotThrowsWhenTheManifestFileIsNotValid() { string manifestPath = Path.Combine(_testDirectoryRoot, _manifestFilename); _fileSystem.File.WriteAllText(manifestPath, _jsonWithMissingField); var toolManifest = new ToolManifestFinder(new DirectoryPath(_testDirectoryRoot), _fileSystem); FilePath toolmanifestFilePath = toolManifest.FindFirst(); toolmanifestFilePath.Value.Should().Be(manifestPath); }
public void GivenManifestFileOnSameDirectoryItCanFindTheFirstManifestFile() { string manifestPath = Path.Combine(_testDirectoryRoot, _manifestFilename); _fileSystem.File.WriteAllText(manifestPath, _jsonContent); var toolManifest = new ToolManifestFinder(new DirectoryPath(_testDirectoryRoot), _fileSystem); FilePath toolmanifestFilePath = toolManifest.FindFirst(); toolmanifestFilePath.Value.Should().Be(manifestPath); }