Пример #1
0
        private static LsUseCase CreateLsUseCase(ILog log)
        {
            var filesGateway = SubstituteFilesGatewayBuilder.Create()
                               .Build();

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

            return(new LsUseCase(filesGateway, directoriesGateway, log));
        }
Пример #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>()));
        }
Пример #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>()));
        }