Ejemplo n.º 1
0
        public void All_sql_files_should_be_included_as_embedded_resources()
        {
            //Tarantino.DatabaseManager.Core.InfrastructureDependencyRegistrar.RegisterInfrastructure();
            string assembly = SqlDatabaseManager.SQL_FILE_ASSEMBLY;
            string template = SqlDatabaseManager.SQL_FILE_TEMPLATE;

            IResourceFileLocator locator = new ResourceFileLocator();

            Assert.That(locator.FileExists(assembly, string.Format(template, "CreateSchema")));
            Assert.That(locator.FileExists(assembly, string.Format(template, "DropConnections")));
            Assert.That(locator.FileExists(assembly, string.Format(template, "VersionDatabase")));
        }
Ejemplo n.º 2
0
        public void All_sql_files_should_be_included_as_embedded_resources()
        {
            string assembly = SqlDatabaseManager.SQL_FILE_ASSEMBLY;
            string template = SqlDatabaseManager.SQL_FILE_TEMPLATE;

            IResourceFileLocator locator = new ResourceFileLocator();

            Assert.That(locator.FileExists(assembly, string.Format(template, "CreateSchema")));
            Assert.That(locator.FileExists(assembly, string.Format(template, "CreateTestDataSchema")));
            Assert.That(locator.FileExists(assembly, string.Format(template, "DropConnections")));
            Assert.That(locator.FileExists(assembly, string.Format(template, "VersionDatabase")));
        }
Ejemplo n.º 3
0
        public void Correctly_reports_when_resource_file_does_not_exist()
        {
            IResourceFileLocator locator = new ResourceFileLocator();
            bool exists = locator.FileExists(_testAssembly, string.Format(_resourceTemplate, "BadFile.tab"));

            Assert.That(exists, Is.False);
        }