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