Esempio n. 1
0
        private static LsUseCase CreateLsUseCase(ILog log)
        {
            var filesGateway = SubstituteFilesGatewayBuilder.Create()
                               .Build();

            var directoriesGateway = SubstituteDirectoriesGatewayBuilder.Create()
                                     .Build();

            return(new LsUseCase(filesGateway, directoriesGateway, log));
        }
Esempio n. 2
0
        private static LsUseCase CreateLsUseCaseWithDirectoriesError(string path, string error)
        {
            var filesGateway = SubstituteFilesGatewayBuilder.Create()
                               .Build();

            var directoriesGateway = SubstituteDirectoriesGatewayBuilder.Create()
                                     .WithError(path, error)
                                     .Build();

            return(new LsUseCase(filesGateway, directoriesGateway, Substitute.For <ILog>()));
        }
Esempio n. 3
0
        private static LsUseCase CreateLsUseCase(string path, List <FsFile> files, List <FsDirectory> directories)
        {
            var filesGateway = SubstituteFilesGatewayBuilder.Create()
                               .WithFiles(path, files)
                               .Build();

            var directoriesGateway = SubstituteDirectoriesGatewayBuilder.Create()
                                     .WithDirectories(path, directories)
                                     .Build();

            return(new LsUseCase(filesGateway, directoriesGateway, Substitute.For <ILog>()));
        }