예제 #1
0
        public void ShouldPassWhenPassedNullConnectionStringButCurrentDbVersionIsSpecified()
        {
            Validator validator = new Validator();

            validator.SetUsage("nant");
            validator.Validate(null, DBMS, DIR, OUTPUT_FILE, 2);
        }
예제 #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
        }
예제 #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);
     }
 }
예제 #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);
     }
 }
예제 #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);
     }
 }
예제 #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);
            }
        }
예제 #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);
            }
        }
예제 #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);
            }
        }
예제 #9
0
 public void ShouldPassWhenPassedNullConnectionStringButCurrentDbVersionIsSpecified()
 {
     Validator validator = new Validator();
     validator.SetUsage("nant");
     validator.Validate(null, DBMS, DIR, OUTPUT_FILE, 2);
 }
예제 #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
        }