public void FolderBasedMigrationLoaderShouldNotFindUndefinedMigrations() { var testSubject = new MigrationRepoDirectory(DirectoryWithTwoMigrations()); var result = testSubject.LoadMigrationIfPresent(7); result.Should().BeNull(); }
public void FolderBasedMigrationLoaderShouldIgnoreNonMigrationFiles() { var repo = DirectoryWithTwoMigrations(); repo.AddFile("readme.txt", "content is unimportant"); var testSubject = new MigrationRepoDirectory(repo); testSubject.MaxMigrationVersionFound.Should().Be(2); }
public void FolderBasedMigrationLoaderShouldFindMigrationsThatAreDefinedInTheFolder() { var testSubject = new MigrationRepoDirectory(DirectoryWithTwoMigrations()); var result = testSubject.LoadMigrationIfPresent(1); result.Should().NotBeNull(); result.Version.Should().Be(1); result.Apply.Should().Be("create table Foo;"); }
public void FolderBasedMigrationLoaderShouldIgnoreNonMigrationFiles() { var repo = DirectoryWithTwoMigrations(); repo.AddFile("readme.txt", "content is unimportant"); var testSubject = new MigrationRepoDirectory(repo); testSubject.MaxMigrationVersionFound.Should().Be(2); }
public void FolderBasedMigrationLoaderShouldFindMigrationsThatAreDefinedInTheFolder() { var testSubject = new MigrationRepoDirectory(DirectoryWithTwoMigrations()); var result = testSubject.LoadMigrationIfPresent(1); result.Should().NotBeNull(); result.Version.Should().Be(1); result.Apply.Should().Be("create table Foo;"); }
public void FolderBasedMigrationLoaderShouldFindNothingWithAnEmptyDirectory() { var testSubject = new MigrationRepoDirectory(new DirectoryInMemory()); testSubject.MaxMigrationVersionFound.Should().Be(-1); }
public void FolderBasedMigrationLoaderShouldFindAllMigrationsInOneFolder() { var testSubject = new MigrationRepoDirectory(DirectoryWithTwoMigrations()); testSubject.MaxMigrationVersionFound.Should().Be(2); }
public void FolderBasedMigrationLoaderShouldNotFindUndefinedMigrations() { var testSubject = new MigrationRepoDirectory(DirectoryWithTwoMigrations()); var result = testSubject.LoadMigrationIfPresent(7); result.Should().BeNull(); }
public void FolderBasedMigrationLoaderShouldFindNothingWithAnEmptyDirectory() { var testSubject = new MigrationRepoDirectory(new DirectoryInMemory()); testSubject.MaxMigrationVersionFound.Should().Be(-1); }
public void FolderBasedMigrationLoaderShouldFindAllMigrationsInOneFolder() { var testSubject = new MigrationRepoDirectory(DirectoryWithTwoMigrations()); testSubject.MaxMigrationVersionFound.Should().Be(2); }