//[Test] // TODO: restore
        public void Main_file_based_ctor_loads_all_files_with_given_prefix()
        {
            SetUpDirectory();

            var mainFile = _path.Join("Foo.boo");

            _mockFileSystem.SetupExistance(mainFile, FileSystemTestUtils.PathExistance.File);
            ValidateMultiFile(new MultiFile(_mockFileSystem.Object, mainFile));
        }
 public void SetUp()
 {
     _mockFileSystem    = FileSystemTestUtils.CreateMock();
     _configurationName = "config.yaml";
     _path = new FileSystemPath(@"foo\bar");
     _configurationPath = _path.Join(_configurationName);
 }
Exemplo n.º 3
0
        /// <summary>
        /// Checks whether the provided path points to a valid DirectoryBasedObjectWithConfiguration. A valid path should point to
        /// a directory and to contains a configuration file with the provided name.
        /// </summary>
        /// <param name="fileSystem">The file system to use. Must not be null.</param>
        /// <param name="path">The path to check.</param>
        /// <param name="configurationFileName">The file name of the configuration file.</param>
        /// <returns>True if the path points to a valid DirectoryBasedObjectWithConfiguration</returns>
        protected static bool IsPathToSuchObject(IFileSystem fileSystem, FileSystemPath path, string configurationFileName)
        {
            ArgAssert.NotNull(fileSystem, "fileSystem");
            ArgAssert.NotNull(path, "path");
            ArgAssert.NotNull(configurationFileName, "configurationFileName");

            if (!fileSystem.IsDirectory(path))
            {
                return(false);
            }

            var configurationPath = path.Join(configurationFileName);

            return(fileSystem.IsFile(configurationPath));
        }