|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Want a new Job?
Chapters
Services
Feature Zones
|
Note: This is an unedited contribution. If this article is inappropriate,
needs attention or copies someone else's work without reference then please
Report This Article
IntroductionThis is an updated version of the code posted by IPC2000. The following changes have been made:
BackgroundPlease refer to this article for more background on the validation. This is simply a polished version of that piece. Using the codeThe console executable can be run specifying a /c:<connection string> argument as well as a /v:<verbosity> argument. Verbosity values are:
You can also reference the executable directly into NUnit and run the corresponding method. Here's an example c# test method: [TestFixture]
public class DatabaseValidation
{
[Test]
public void CheckForDatabaseCompilationProblems()
{
Assert.IsTrue(
DatabaseValidator.Validator.DatabaseIsValid(
ConfigurationManager.ConnectionStrings[MyConnectionString].ConnectionString,
DatabaseValidator.Verbosity.Normal),
"Invalid objects found in the database - Run SqlValidator");
}
}
History2008-05-02: Initial post
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||