public void DiagnosticInfoShouldHaveSQLiteDatabase() { string name = 8.RandomLetters(); SQLiteDatabase db = new SQLiteDatabase("./{0}"._Format(MethodBase.GetCurrentMethod().Name), name); DiagnosticService svc = new DiagnosticService(null); DiagnosticInfo info = svc.GetDiagnosticInfo(); DatabaseInfo dbInfo = info.Databases.FirstOrDefault(dbi => dbi.ConnectionName.Equals(name)); Expect.IsNotNull(dbInfo); Expect.AreEqual(name, dbInfo.ConnectionName); Expect.AreEqual(typeof(SQLiteDatabase).FullName, dbInfo.DatabaseType); Message.PrintLine("{0}", ConsoleColor.DarkBlue, info.ToYaml()); }
public void DiagnosticInfoShouldHaveOracleDatabase() { string name = 8.RandomLetters(); OracleDatabase msDatabase = new OracleDatabase("chumsql2", name); DiagnosticService svc = new DiagnosticService(null); DiagnosticInfo info = svc.GetDiagnosticInfo(); DatabaseInfo dbInfo = info.Databases.FirstOrDefault(dbi => dbi.ConnectionName.Equals(name)); Expect.IsNotNull(dbInfo); Expect.AreEqual(name, dbInfo.ConnectionName); Expect.AreEqual(typeof(OracleDatabase).FullName, dbInfo.DatabaseType); Message.PrintLine("{0}", ConsoleColor.DarkBlue, info.ToYaml()); }
public void DiagnosticInfoShouldHaveMySqlDatabase() { string name = 8.RandomLetters(); MySqlDatabase mySqlDatabase = new MySqlDatabase("chumsql2", "DaoRef", name); CoreDiagnosticService svc = new CoreDiagnosticService(null); DiagnosticInfo info = svc.GetDiagnosticInfo(); DatabaseInfo dbInfo = info.Databases.FirstOrDefault(dbi => dbi.ConnectionName.Equals(name)); Expect.IsNotNull(dbInfo); Expect.AreEqual(name, dbInfo.ConnectionName); Expect.AreEqual(typeof(MySqlDatabase).FullName, dbInfo.DatabaseType); OutLineFormat("{0}", ConsoleColor.DarkBlue, info.ToYaml()); }