public void GivenAbsolutePathToFile__WithRootedPath__IsValidPath__IsExpected__UNX(string absoluteDirectoryPath, string fileExtension, bool expected) { const string fileName = "test"; IOHelperService svc = new IOHelperService(_fileSystem); Assert.AreEqual(expected, svc.IsValidPath( _fileSystem.Path.Combine(absoluteDirectoryPath, fileName + fileExtension), string.Empty, fileExtension)); }
public void GivenRelativePathToFile__WithoutRootedPath__IsValidPath__IsFalse_WIN(string absoluteDirectoryPath, string fileExtension) { const string fileName = "test"; IOHelperService svc = new IOHelperService(_fileSystem); Assert.IsFalse(svc.IsValidPath( _fileSystem.Path.Combine(absoluteDirectoryPath, fileName + fileExtension), string.Empty, fileExtension)); }
public void GivenRelativePathToFile__IsValidPath__IsExpected_WIN(string relativeDirectoryPath, string basePath, string fileExtension, bool expected) { const string fileName = "test"; IOHelperService svc = new IOHelperService(_fileSystem); Assert.AreEqual(expected, svc.IsValidPath( _fileSystem.Path.Combine(relativeDirectoryPath, fileName + fileExtension), basePath, fileExtension)); }