Esempio n. 1
0
        public void SpecialZeroLoaderShouldAlwaysFindTheOneMagicMigration()
        {
            var testSubject = new MigrationRepoMakeDbVersionAware();

            testSubject.MaxMigrationVersionFound.Should().Be(0);
            testSubject.LoadMigrationIfPresent(0).Should().NotBeNull();
        }
 public void SpecialMigrationShouldKnowHowToApply()
 {
     var testSubject = new MigrationRepoMakeDbVersionAware().LoadMigrationIfPresent(0);
     testSubject.Version.Should().Be(0);
     testSubject.InsertTestData.Should().Be(string.Empty);
     testSubject.DeleteTestData.Should().Be(string.Empty);
     testSubject.Apply.Should().Be(CreateVersionInfoTableSql);
     testSubject.Unapply.Should().Be(DropVersionInfoTableSql);
 }
Esempio n. 3
0
        public void SpecialMigrationShouldKnowHowToApply()
        {
            var testSubject = new MigrationRepoMakeDbVersionAware().LoadMigrationIfPresent(0);

            testSubject.Version.Should().Be(0);
            testSubject.InsertTestData.Should().Be(string.Empty);
            testSubject.DeleteTestData.Should().Be(string.Empty);
            testSubject.Apply.Should().Be(CreateVersionInfoTableSql);
            testSubject.Unapply.Should().Be(DropVersionInfoTableSql);
        }
 public void SpecialZeroLoaderShouldAlwaysFindTheOneMagicMigration()
 {
     var testSubject = new MigrationRepoMakeDbVersionAware();
     testSubject.MaxMigrationVersionFound.Should().Be(0);
     testSubject.LoadMigrationIfPresent(0).Should().NotBeNull();
 }