Пример #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")));
        }
Пример #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")));
        }
Пример #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);
        }