public override async Task DoSetup() { #region Setup SettingsTableContent DbContextHelper dbContextHelper = new DbContextHelper(ConnectionString); SqlController sql = new SqlController(dbContextHelper); await sql.SettingUpdate(Settings.token, "abc1234567890abc1234567890abcdef").ConfigureAwait(false); await sql.SettingUpdate(Settings.firstRunDone, "true").ConfigureAwait(false); await sql.SettingUpdate(Settings.knownSitesDone, "true").ConfigureAwait(false); #endregion sut = new Core(); sut.HandleCaseCreated += EventCaseCreated; sut.HandleCaseRetrived += EventCaseRetrived; sut.HandleCaseCompleted += EventCaseCompleted; sut.HandleCaseDeleted += EventCaseDeleted; sut.HandleFileDownloaded += EventFileDownloaded; sut.HandleSiteActivated += EventSiteActivated; await sut.StartSqlOnly(ConnectionString).ConfigureAwait(false); path = System.Reflection.Assembly.GetExecutingAssembly().CodeBase; path = System.IO.Path.GetDirectoryName(path).Replace(@"file:", ""); await sut.SetSdkSetting(Settings.fileLocationPicture, Path.Combine(path, "output", "dataFolder", "picture")); await sut.SetSdkSetting(Settings.fileLocationPdf, Path.Combine(path, "output", "dataFolder", "pdf")); await sut.SetSdkSetting(Settings.fileLocationJasper, Path.Combine(path, "output", "dataFolder", "reports")); testHelpers = new TestHelpers(); testHelperReturnXml = new TestHelperReturnXML(); //sut.StartLog(new CoreBase()); }
public override void DoSetup() { #region Setup SettingsTableContent SqlController sql = new SqlController(ConnectionString); sql.SettingUpdate(Settings.token, "abc1234567890abc1234567890abcdef"); sql.SettingUpdate(Settings.firstRunDone, "true"); sql.SettingUpdate(Settings.knownSitesDone, "true"); #endregion sut = new Core(); sut.HandleCaseCreated += EventCaseCreated; sut.HandleCaseRetrived += EventCaseRetrived; sut.HandleCaseCompleted += EventCaseCompleted; sut.HandleCaseDeleted += EventCaseDeleted; sut.HandleFileDownloaded += EventFileDownloaded; sut.HandleSiteActivated += EventSiteActivated; sut.StartSqlOnly(ConnectionString); path = System.Reflection.Assembly.GetExecutingAssembly().CodeBase; path = System.IO.Path.GetDirectoryName(path).Replace(@"file:\", ""); sut.SetPicturePath(path + @"\output\dataFolder\picture\"); sut.SetPdfPath(path + @"\output\dataFolder\pdf\"); sut.SetJasperPath(path + @"\output\dataFolder\reports\"); testHelpers = new TestHelpers(); testHelperReturnXml = new TestHelperReturnXML(); //sut.StartLog(new CoreBase()); }