示例#1
0
        public void ShouldNotThinkThereIsAGapWhenThereAreNoMigrations()
        {
            var migrations = new List <Migration> {
                new Migration("2006", "asdf", ""),
                new Migration("2006-01", "98sd98", ""),
                new Migration("2007", "fdsa", "")
            };
            var db = new MigrationTracker(migrations, null);

            Assert.IsFalse(db.IsMigrationGap());
        }
示例#2
0
        public void ShouldNotThinkThereIsAGapWhenThereIsASingleMigration()
        {
            var migrations = new List <Migration> {
                new Migration("2006", "asdf", ""),
                new Migration("2006-01", "98sd98", ""),
                new Migration("2007", "fdsa", "")
            };
            var hashes = new Dictionary <string, string>();

            hashes.Add(migrations[0].Version, migrations[0].Hash);
            var db = new MigrationTracker(migrations, hashes);

            Assert.IsFalse(db.IsMigrationGap());
        }