static void Main(string[] args) { DataTableToList datatabletolist = new DataTableToList(); datatabletolist.SingleTest(); //DataTable => Object datatabletolist.ListTest(); //DataTable => List datatabletolist.ListFilterTest(); //DataTable => List, filter포함 DataBaseTest databasetest = new DataBaseTest(); databasetest.MultiTransationTest(); //멀티트랜잭션 테스트 databasetest.OutputTest(); //파라미터 output테스트 databasetest.PerformanceTest(); //성능테스트 Console.ReadLine(); }
public void TestFileLog() { ILogDestination consoleWriterInjector = new ConsoleTest(); ILogDestination fileWriterInjector = new FileTest(); ILogDestination dataBaseWriterInjector = new DataBaseTest(); var jobLogger = new JobLogger2(false, true, false, false); //aplicar ID x set jobLogger.LoggerConsole = consoleWriterInjector; jobLogger.LoggerFile = fileWriterInjector; jobLogger.LoggerDataBase = dataBaseWriterInjector; jobLogger.LogAsMessage("test"); jobLogger.LogAsWarning("test"); jobLogger.LogAsError("test"); Assert.AreEqual(((DataBaseTest)dataBaseWriterInjector).GetResults().Count, 0); Assert.AreEqual(((FileTest)fileWriterInjector).GetResults().Count, 3); Assert.AreEqual(((ConsoleTest)consoleWriterInjector).GetResults().Count, 0); }