Ejemplo n.º 1
0
        public void RunAllTests_Oracle()
        {
            var sqlGeneratorTests = new SqlGeneratorTests(connString, dbType);

            var methods = sqlGeneratorTests.GetType().GetMethods();

            DataTable results = null;

            foreach (var method in methods)
            {
                results = null;
                if (method.ReturnType == typeof(DataTable) && method.IsPublic)
                {
                    try
                    {
                        results = (DataTable)method.Invoke(new SqlGeneratorTests(connString, dbType), null);
                        Assert.IsTrue(results.Rows.Count > 0, $"{method.Name} failed.");
                    }
                    catch (Exception ex)
                    {
                        Assert.IsTrue(false, $"{method.Name} failed.  {ex.Message}.  {ex.InnerException}");
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public void RunAllTests_PostgreSQL()
        {
            var sqlGeneratorTests = new SqlGeneratorTests(connString, dbType);

            var methods = sqlGeneratorTests.GetType().GetMethods();

            foreach (var method in methods)
            {
                if (method.ReturnType == typeof(DataTable) && method.IsPublic)
                {
                    var results = (DataTable)method.Invoke(new SqlGeneratorTests(connString, dbType), null);
                    Assert.IsTrue(results.Rows.Count > 0, $"{method.Name} failed.");
                }
            }
        }