public CoverageEngineFactory(IJsonSerializer jsonSerializer, IFileSystemWrapper fileSystem, ILineCoverageMapper lineCoverageMapper, IUrlBuilder urlBuilder) { this.urlBuilder = urlBuilder; this.jsonSerializer = jsonSerializer; this.fileSystem = fileSystem; this.lineCoverageMapper = lineCoverageMapper; }
public PlatformDataSource(IFileSystemWrapper fileSystemWrapper, ICacheService cache) : base(CmsConstants.CMS) { this._fileSystemWrapper = fileSystemWrapper; this._cache = cache; this.Configuration.ValidateOnSaveEnabled = false; }
public EventListingData(IHttpWrapper httpWrapper, IAppCache cache, ILogger <EventListingData> logger, IFileSystemWrapper fileSystemWrapper) { _httpWrapper = httpWrapper; _cache = cache; _logger = logger; _fileSystemWrapper = fileSystemWrapper; }
public Crawler(IWebLoader loader, IFileSystemWrapper fileSystem, IHtmlParserFactory parserFactory, string uri, bool isNeedUploadOtherDomens = false, int parallelDownloadFactor = 10) { if (loader == null) { throw new ArgumentNullException("loader"); } if (fileSystem == null) { throw new ArgumentNullException("fileSystem"); } if (parserFactory == null) { throw new ArgumentNullException("parserFactory"); } if (!Uri.IsWellFormedUriString(uri, UriKind.Absolute)) { throw new ArgumentException("Не верный формат uri " + uri); } this.loader = new RestrictedWebLoader(loader, parallelDownloadFactor); this.fileSystem = fileSystem; this.parserFactory = parserFactory; this.isNeedUploadOtherDomens = isNeedUploadOtherDomens; this.baseUri = new Uri(uri); }
public XmlFileSystem([NotNull] IFileSystemWrapper fileSystem) { fileSystem.ShouldNotBeNull("fileSystem"); this.fileSystem = fileSystem; serializer = new XmlSerializer(typeof(T)); }
public CreateConfigFileStrategy(IBaseReporter reporter, IConfigFileGenerator configFileGenerator, IFileSystemWrapper fileSystem) { this.reporter = reporter; this.configFileGenerator = configFileGenerator; this.fileSystem = fileSystem; defaultConfigFilePath = fileSystem.CombinePath(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), @".tsqllintrc"); }
public TestableSourceMapDotNetLineCoverageMapper(IFileSystemWrapper fileSystem, IDictionary <int, FileLineMapping[]> mappings) : base(fileSystem) { this.mappings = mappings.ToDictionary(x => x.Key, x => x.Value.Select(y => new SourceReference { LineNumber = y.LineNumber, File = y.File }).ToArray()); }
/// <summary> /// Initializes a new instance of the <see cref="JSLintTask" /> class with custom services. /// </summary> /// <param name="jsLintFactory">The JSLint factory.</param> /// <param name="fileSystemWrapper">The file system wrapper.</param> /// <param name="taskLoggingHelperFactory">The task logging helper factory.</param> /// <param name="reporterFactory">The reporter factory.</param> public JSLintTask(IJSLintFactory jsLintFactory, IFileSystemWrapper fileSystemWrapper, ITaskLoggingHelperFactory taskLoggingHelperFactory, IReporterFactory reporterFactory) { this.jsLintFactory = jsLintFactory; this.fileSystemWrapper = fileSystemWrapper; this.reporterFactory = reporterFactory; this.LoggingHelper = taskLoggingHelperFactory.Create(this); }
/// <summary> /// Initializes a new instance of the <see cref="JSLintTask" /> class with custom services. /// </summary> /// <param name="jsLintFactory">The JSLint factory.</param> /// <param name="fileSystemWrapper">The file system wrapper.</param> /// <param name="abstractionFactory">The task logging helper factory.</param> /// <param name="settingsRepository">The settings repository.</param> internal JSLintTask(IJSLintFactory jsLintFactory, IFileSystemWrapper fileSystemWrapper, IAbstractionFactory abstractionFactory, ISettingsRepository settingsRepository) { this.jsLintFactory = jsLintFactory; this.fileSystemWrapper = fileSystemWrapper; this.settingsRepository = settingsRepository; this.LoggingHelper = abstractionFactory.CreateTaskLoggingHelper(this); }
public void SetUp() { _fileSystemWrapper = MockRepository.GenerateStub <IFileSystemWrapper>(); _source = @"c:\temp\test.txt"; _file = new File(_source); _destination = @"c:\test.txt"; _subject = new MoveFileArtifact(_fileSystemWrapper, _file); }
/// <summary> /// Initializes a new instance of the <see cref="JSLintContext" /> class. /// </summary> /// <param name="abstractionFactory">The abstraction factory.</param> /// <param name="jsonProvider">The JSON provider.</param> /// <param name="fileSystemWrapper">The file system wrapper.</param> internal JSLintContext(IAbstractionFactory abstractionFactory, IJsonProvider jsonProvider, IFileSystemWrapper fileSystemWrapper) { this.context = abstractionFactory.CreateJavaScriptContext(); this.jsonProvider = jsonProvider; this.fileSystemWrapper = fileSystemWrapper; this.LoadJSLint(); }
public ConsoleJSLintProvider(IJSLintFactory jsLintFactory, IFileSystemWrapper fileSystemWrapper, ISettingsRepository settingRepository, IConsoleWriter consoleWriter, IViewFactory viewFactory) { this.jsLintFactory = jsLintFactory; this.fileSystemWrapper = fileSystemWrapper; this.settingRepository = settingRepository; this.consoleWriter = consoleWriter; this.viewFactory = viewFactory; }
public void SetUp() { _fileSystemWrapper = MockRepository.GenerateStub<IFileSystemWrapper>(); _source = @"c:\temp\test.txt"; _file = new File(_source); _destination = @"c:\test.txt"; _subject = new MoveFileArtifact(_fileSystemWrapper, _file); }
public BlanketJsCoverageEngine(IJsonSerializer jsonSerializer, IFileSystemWrapper fileSystem) { this.jsonSerializer = jsonSerializer; this.fileSystem = fileSystem; includePatterns = new List <string>(); excludePatterns = new List <string>(); }
public SourceMapDotNetLineCoverageMapper(IFileSystemWrapper fileSystem) { if (fileSystem == null) { throw new ArgumentNullException("fileSystem"); } this.fileSystem = fileSystem; }
public ChutzpahTestSettingsService(IFileProbe fileProbe, IJsonSerializer serializer, IFileSystemWrapper fileSystem) { this.fileProbe = fileProbe; this.serializer = serializer; this.fileSystem = fileSystem; }
public YouTubeChannelVideos(IHttpWrapper httpWrapper, IAppCache cache, ILogger <YouTubeChannelVideos> logger, IFileSystemWrapper fileSystemWrapper, ISecretManager secretManager) { _httpWrapper = httpWrapper; _cache = cache; _logger = logger; _fileSystemWrapper = fileSystemWrapper; _secretManager = secretManager; }
public ConsoleJSLintProvider(Func<IJSLintContext> jsLintFactory, IFileSystemWrapper fileSystemWrapper, ISettingsRepository settingRepository, IConsoleWriter consoleWriter, IViewFactory viewFactory) { this.jsLintFactory = jsLintFactory; this.fileSystemWrapper = fileSystemWrapper; this.settingRepository = settingRepository; this.consoleWriter = consoleWriter; this.viewFactory = viewFactory; }
public static IEnumerable <SummaryTransformer> GetTransformers(IFileSystemWrapper fileSystem) { return(new SummaryTransformer[] { new JUnitXmlTransformer(fileSystem), new LcovTransformer(fileSystem), new TrxXmlTransformer(fileSystem), }); }
public static IEnumerable<SummaryTransformer> GetTransformers(IFileSystemWrapper fileSystem) { return new SummaryTransformer[] { new JUnitXmlTransformer(fileSystem), new LcovTransformer(fileSystem), new TrxXmlTransformer(fileSystem), }; }
public SourceMapDiscoverer(IFileSystemWrapper fileSystemWrapper) { if (fileSystemWrapper == null) { throw new ArgumentNullException("fileSystemWrapper"); } this.fileSystemWrapper = fileSystemWrapper; }
public void Setup() { _source = @"c:\temp\nonexistant.txt"; _destination = @"c:\temp\nonexistant2.txt"; _artifact = new File(_source); _fileSystemWrapper = MockRepository.GenerateStub<IFileSystemWrapper>(); _copyEngine = new CopyFile(_fileSystemWrapper, _artifact); }
public CmsInitializer(PlatformDataSource platformDataSource, IFileSystemWrapper fileSystemWrapper, IImageConverter imageConverter) { this._platformDataSource = platformDataSource; this._fileSystemWrapper = fileSystemWrapper; this._imageConverter = imageConverter; // I must use the service locator here because no implementation for IMembershipService // could be available. this._membershipService = DependencyInjector.TryGet<IMembershipService>(); }
public TestHarness(ChutzpahTestSettingsFile chutzpahTestSettings, TestOptions testOptions, IEnumerable<ReferencedFile> referencedFiles, IFileSystemWrapper fileSystem) { this.chutzpahTestSettings = chutzpahTestSettings; this.testOptions = testOptions; this.referencedFiles = referencedFiles; this.fileSystem = fileSystem; BuildTags(referencedFiles); CleanupTestHarness(); }
public DirectoryTruncator(string targetDirectory, IFileSystemWrapper fileSystemWrapper) { if (string.IsNullOrWhiteSpace(targetDirectory)) throw new ArgumentException(); _targetDirectory = targetDirectory; _fileSystemWrapper = fileSystemWrapper ?? new FileSystemWrapper(); if (!_fileSystemWrapper.DirectoryExists(targetDirectory)) throw new ArgumentException("The target directory {0} does not exist", targetDirectory); }
public Html(ReferencedFile referencedFile, IFileSystemWrapper fileSystem) : base(referencedFile, null, false) { contents = fileSystem.GetText(referencedFile.Path); if (referencedFile.TemplateOptions.Mode == TemplateMode.Script) { contents = string.Format(scriptTagWrapper, referencedFile.TemplateOptions.Id, referencedFile.TemplateOptions.Type, contents); } }
public TestHarness(ChutzpahTestSettingsFile chutzpahTestSettings, TestOptions testOptions, IEnumerable <ReferencedFile> referencedFiles, IFileSystemWrapper fileSystem) { this.chutzpahTestSettings = chutzpahTestSettings; this.testOptions = testOptions; this.referencedFiles = referencedFiles; this.fileSystem = fileSystem; BuildTags(referencedFiles); CleanupTestHarness(); }
public CmsInitializer(PlatformDataSource platformDataSource, IFileSystemWrapper fileSystemWrapper, IImageConverter imageConverter) { this._platformDataSource = platformDataSource; this._fileSystemWrapper = fileSystemWrapper; this._imageConverter = imageConverter; // I must use the service locator here because no implementation for IMembershipService // could be available. this._membershipService = DependencyInjector.TryGet <IMembershipService>(); }
public ImportPokemonCommand( ILogger logger, IPokemonStore database, IPokemonReader pokemonReader, IFileSystemWrapper fileSystemWrapper) { _logger = logger; _database = database; _pokemonReader = pokemonReader; _fileSystemWrapper = fileSystemWrapper; }
public ImportFileCommand( IDatabase database, IEntityReader entityReader, ILogger logger, IFileSystemWrapper fileSystemWrapper) { _database = database; _entityReader = entityReader; _logger = logger; _fileSystemWrapper = fileSystemWrapper; }
public TestHarnessBuilder( IReferenceProcessor referenceProcessor, IFileSystemWrapper fileSystem, IFileProbe fileProbe, IHasher hasher) { this.referenceProcessor = referenceProcessor; this.fileSystem = fileSystem; this.fileProbe = fileProbe; this.hasher = hasher; }
public BlanketJsCoverageEngine(IJsonSerializer jsonSerializer, IFileSystemWrapper fileSystem, ILineCoverageMapper lineCoverageMapper, IUrlBuilder urlBuilder) { this.urlBuilder = urlBuilder; this.jsonSerializer = jsonSerializer; this.fileSystem = fileSystem; this.lineCoverageMapper = lineCoverageMapper; includePatterns = new List <string>(); excludePatterns = new List <string>(); ignorePatterns = new List <string>(); }
public InventoryRepo( IInventorySnapshotProcessor snapshotProcessor, IResourceRepo resourceRepo, IFileSystemWrapper fileSystem) : base(fileSystem) { _resourceRepo = resourceRepo; _fileSystem = fileSystem; _inventorySnapshotProcessor = snapshotProcessor; }
public CommandLineOptionHandler( IConfigFileGenerator configFileGenerator, IConfigReader configReader, IBaseReporter reporter, IFileSystemWrapper fileSystemWrapper) { this.configFileGenerator = configFileGenerator; this.configReader = configReader; this.reporter = reporter; this.fileSystemWrapper = fileSystemWrapper; }
public IEnumerable <SummaryTransformer> GetTransformers(IFileSystemWrapper fileSystem) { return(new SummaryTransformer[] { new JUnitXmlTransformer(fileSystem), new LcovTransformer(fileSystem), new TrxXmlTransformer(fileSystem), new NUnit2XmlTransformer(fileSystem), new CoverageHtmlTransformer(fileSystem), new CoverageJsonTransformer(fileSystem) }); }
public IEnumerable<SummaryTransformer> GetTransformers(IFileSystemWrapper fileSystem) { return new SummaryTransformer[] { new JUnitXmlTransformer(fileSystem), new LcovTransformer(fileSystem), new TrxXmlTransformer(fileSystem), new NUnit2XmlTransformer(fileSystem), new CoverageHtmlTransformer(fileSystem), new CoverageJsonTransformer(fileSystem) }; }
/// <summary> /// Initializes a new instance of the <see cref="VisualStudioJSLintProvider" /> class. /// </summary> /// <param name="serviceProvider">The service provider.</param> /// <param name="errorListProvider">The error list provider.</param> /// <param name="jsLintFactory">The JSLint factory.</param> /// <param name="fileSystemWrapper">The file system wrapper.</param> /// <param name="settingsRepository">The settings repository.</param> /// <param name="cacheProvider">The cache provider.</param> public VisualStudioJSLintProvider(IServiceProvider serviceProvider, IJSLintErrorListProvider errorListProvider, Func <IJSLintContext> jsLintFactory, IFileSystemWrapper fileSystemWrapper, ISettingsRepository settingsRepository, ICacheProvider cacheProvider) { this.serviceProvider = serviceProvider; this.errorListProvider = errorListProvider; this.jsLintFactory = jsLintFactory; this.fileSystemWrapper = fileSystemWrapper; this.settingsRepository = settingsRepository; this.cacheProvider = cacheProvider; this.statusBar = this.serviceProvider.GetService <SVsStatusbar, IVsStatusbar>(); this.solutionService = this.serviceProvider.GetService <SVsSolution, IVsSolution>(); }
public TestHarness(TestContext testContext, TestOptions testOptions, IEnumerable <ReferencedFile> referencedFiles, IFileSystemWrapper fileSystem, IUrlBuilder urlBuilder) { this.urlBuilder = urlBuilder; this.testContext = testContext; this.chutzpahTestSettings = testContext.TestFileSettings; this.testOptions = testOptions; this.referencedFiles = referencedFiles; this.fileSystem = fileSystem; BuildTags(referencedFiles); CleanupTestHarness(); }
/// <summary> /// Initializes a new instance of the <see cref="VisualStudioJSLintProvider" /> class. /// </summary> /// <param name="serviceProvider">The service provider.</param> /// <param name="errorListProvider">The error list provider.</param> /// <param name="jsLintFactory">The JSLint factory.</param> /// <param name="fileSystemWrapper">The file system wrapper.</param> /// <param name="settingsRepository">The settings repository.</param> /// <param name="cacheProvider">The cache provider.</param> public VisualStudioJSLintProvider(IServiceProvider serviceProvider, IJSLintErrorListProvider errorListProvider, IJSLintFactory jsLintFactory, IFileSystemWrapper fileSystemWrapper, ISettingsRepository settingsRepository, ICacheProvider cacheProvider) { this.serviceProvider = serviceProvider; this.errorListProvider = errorListProvider; this.jsLintFactory = jsLintFactory; this.fileSystemWrapper = fileSystemWrapper; this.settingsRepository = settingsRepository; this.cacheProvider = cacheProvider; this.statusBar = this.serviceProvider.GetService<SVsStatusbar, IVsStatusbar>(); this.solutionService = this.serviceProvider.GetService<SVsSolution, IVsSolution>(); }
public CheckFile(string filePath, IFileSystemWrapper fileSystemWrapper = null ) { if (fileSystemWrapper != null) this.fileSystem = fileSystemWrapper; else this.fileSystem = FileSystemWrapper.GetInstance(); CheckFileExists(filePath); this.filePath = filePath; this.Checked = false; this.IsDuplicated = false; this.FileId = 0; this.Size = fileSystemWrapper.GetFileSize(filePath); }
public void GenerateMp3(IFileSystemWrapper fileSystem, string path) { using (var writer = fileSystem.FileWriter($@"{path}\{this.Title}")) { byte[] frame = null; while ((frame = this.RawData) != null) { if (this.IsInInterval) { writer.Write(frame, 0, frame.Length); } } } }
public TestContextBuilder( IFileSystemWrapper fileSystem, IReferenceProcessor referenceProcessor, IHttpWrapper httpWrapper, IFileProbe fileProbe, ICoverageEngineFactory coverageEngineFactory, IEnumerable<IFrameworkDefinition> frameworkDefinitions, IChutzpahTestSettingsService settingsService) { this.referenceProcessor = referenceProcessor; this.httpClient = httpWrapper; this.fileSystem = fileSystem; this.fileProbe = fileProbe; this.frameworkDefinitions = frameworkDefinitions; this.settingsService = settingsService; this.coverageEngineFactory = coverageEngineFactory; }
public TestContextBuilder( IReferenceProcessor referenceProcessor, IFileSystemWrapper fileSystem, IHttpWrapper httpWrapper, IFileProbe fileProbe, IHasher hasher, ICoverageEngine coverageEngine, IJsonSerializer serializer, IEnumerable<IFrameworkDefinition> frameworkDefinitions, IEnumerable<IFileGenerator> fileGenerators) { this.referenceProcessor = referenceProcessor; this.httpClient = httpWrapper; this.fileSystem = fileSystem; this.fileProbe = fileProbe; this.hasher = hasher; this.serializer = serializer; this.frameworkDefinitions = frameworkDefinitions; this.fileGenerators = fileGenerators; mainCoverageEngine = coverageEngine; }
public CompilerCache(IFileSystemWrapper fileSystem, IBinarySerializer binarySerializer) { hasher = new Hasher(); compilerCache = new ConcurrentDictionary<string, Tuple<DateTime, string>>(); filesystem = fileSystem; this.binarySerializer = binarySerializer; if (string.IsNullOrEmpty(GlobalOptions.Instance.CompilerCacheFile)) { filename = Path.Combine(filesystem.GetTemporaryFolder(Constants.ChutzpahCompilerCacheFolder), Constants.ChutzpahCompilerCacheFileName); } else { filename = GlobalOptions.Instance.CompilerCacheFile; } if (fileSystem.FileExists(filename) && GlobalOptions.Instance.CompilerCacheFileMaxSizeBytes > 0) { using (var cacheStream = fileSystem.Open(filename, FileMode.Open, FileAccess.Read)) { compilerCache = DeserializeObject(cacheStream); } } }
public EmmaXmlTransformer(IFileSystemWrapper fileSystem) : base(fileSystem) { }
public FileSystemUtility(ISearchPatternParser parser, IFileSystemWrapper fileSystemWrapper) { _parser = parser; _fileSystemWrapper = fileSystemWrapper; }
public NUnit2XmlTransformer(IFileSystemWrapper fileSystem) : base(fileSystem) { }
public TestableSourceMapDotNetLineCoverageMapper(IFileSystemWrapper fileSystem, IDictionary<int, FileLineMapping[]> mappings) : base(fileSystem) { this.mappings = mappings.ToDictionary(x => x.Key, x => x.Value.Select(y => new SourceReference { LineNumber = y.LineNumber, File = y.File }).ToArray()); }
public MochaLineNumberProcessor(IFileSystemWrapper fileSystem) { this.fileSystem = fileSystem; }
public MailBuilder(IFileSystemWrapper fileSystemWrapper, IMembershipService membershipService) { this._fileSystemWrapper = fileSystemWrapper; this._membershipService = membershipService; }
public ReferenceProcessor(IFileSystemWrapper fileSystem, IFileProbe fileProbe) { this.fileSystem = fileSystem; this.fileProbe = fileProbe; }
public CoverageHtmlTransformer(IFileSystemWrapper fileSystem) : base(fileSystem) { }
public ConsoleOptionsFactory(IFileSystemWrapper fileSystemWrapper) { this.fileSystemWrapper = fileSystemWrapper; }
public FileProbe(IEnvironmentWrapper environment, IFileSystemWrapper fileSystem) { this.environment = environment; this.fileSystem = fileSystem; }
public Html(ReferencedFile referencedFile, IFileSystemWrapper fileSystem) : base(referencedFile, null, false) { contents = fileSystem.GetText(referencedFile.Path); }