Exemplo n.º 1
0
        public void ShouldPassWhenPassedNullConnectionStringButCurrentDbVersionIsSpecified()
        {
            Validator validator = new Validator();

            validator.SetUsage("nant");
            validator.Validate(null, DBMS, DIR, OUTPUT_FILE, 2);
        }
Exemplo n.º 2
0
        protected override void InitializeTask(XmlNode taskNode)
        {
            Validator validator = new Validator();

            validator.SetUsage("nant");
            validator.Validate(dbConnection, dbType, dir.FullName, outputfile.Name, GetCurrentDbVersion());
//            TODO: Add validation for the OutputFileEncoding
        }
Exemplo n.º 3
0
 public void ShouldFailWhenPassedNonOraDbms()
 {
     Validator validator = new Validator();
     validator.SetUsage("nant");
     try
     {
         validator.Validate(ConnectionString, "nothing", DIR, OUTPUT_FILE, null);
         Assert.Fail("BuildException expected");
     }
     catch (BuildException e)
     {
         StringAssert.Contains("Unknown DBMS", e.Message);
     }
 }
Exemplo n.º 4
0
 public void ShouldFailWhenPassedEmptyOutputFile()
 {
     Validator validator = new Validator();
     validator.SetUsage("nant");
     try
     {
         validator.Validate(ConnectionString, DBMS, DIR, "", null);
         Assert.Fail("BuildException expected");
     }
     catch (BuildException e)
     {
         StringAssert.Contains("Output file expected", e.Message);
     }
 }
Exemplo n.º 5
0
 public void ShouldFailWhenPassedEmptyDir()
 {
     Validator validator = new Validator();
     validator.SetUsage("nant");
     try
     {
         validator.Validate(ConnectionString, DBMS, "", OUTPUT_FILE, null);
         Assert.Fail("BuildException expected");
     }
     catch (BuildException e)
     {
         StringAssert.Contains("Dir expected", e.Message);
     }
 }
Exemplo n.º 6
0
        public void ShouldFailWhenPassedEmptyDir()
        {
            Validator validator = new Validator();

            validator.SetUsage("nant");
            try
            {
                validator.Validate(ConnectionString, DBMS, "", OUTPUT_FILE, null);
                Assert.Fail("BuildException expected");
            }
            catch (BuildException e)
            {
                StringAssert.Contains("Dir expected", e.Message);
            }
        }
Exemplo n.º 7
0
        public void ShouldFailWhenPassedNonOraDbms()
        {
            Validator validator = new Validator();

            validator.SetUsage("nant");
            try
            {
                validator.Validate(ConnectionString, "nothing", DIR, OUTPUT_FILE, null);
                Assert.Fail("BuildException expected");
            }
            catch (BuildException e)
            {
                StringAssert.Contains("Unknown DBMS", e.Message);
            }
        }
Exemplo n.º 8
0
        public void ShouldFailWhenPassedEmptyOutputFile()
        {
            Validator validator = new Validator();

            validator.SetUsage("nant");
            try
            {
                validator.Validate(ConnectionString, DBMS, DIR, "", null);
                Assert.Fail("BuildException expected");
            }
            catch (BuildException e)
            {
                StringAssert.Contains("Output file expected", e.Message);
            }
        }
Exemplo n.º 9
0
 public void ShouldPassWhenPassedNullConnectionStringButCurrentDbVersionIsSpecified()
 {
     Validator validator = new Validator();
     validator.SetUsage("nant");
     validator.Validate(null, DBMS, DIR, OUTPUT_FILE, 2);
 }
Exemplo n.º 10
0
        protected override void InitializeTask(XmlNode taskNode)
        {
            Validator validator = new Validator();
            validator.SetUsage("nant");
            validator.Validate(dbConnection, dbType, dir.FullName, outputfile.Name, GetCurrentDbVersion());
//            TODO: Add validation for the OutputFileEncoding
        }