public void StartProcessing() { string ftpPath = Properties.Settings.Default.FtpFolderPath; string processedPath = Properties.Settings.Default.ProcessedFolderPath; var databaseAccess = new DatabaseAccess(Properties.Settings.Default.DatabaseConnectionString); var parseManager = GetParseManager(); var importProcessor = new ImportProcessor(databaseAccess, parseManager, ftpPath, processedPath); importProcessor.ProcessImport(); }
public void GIVEN__StoredProcedureTestProcIsCalled__WHEN__DatabaseAccessIsUsedWithMultipleThreads__THEN__ExceptionIsNotThrown() { //Arrange var databaseAccess = new DatabaseAccess(_connectionString); bool exceptionThrown = false; //Act try { Parallel.For(0, 1000, i => { databaseAccess.ExecuteStoredProcedureNonQuery("TestProc", new SqlParameter("Id", i)); } ); } catch (Exception) { exceptionThrown = true; } //Assert Assert.False(exceptionThrown); }