Exemple #1
0
        public void Should_delete_versions_migrating_down()
        {
            _versionRepository.EnsureSchemaVersionTable(AllMigrations);
            _versionRepository.InsertVersion(M1);
            _versionRepository.InsertVersion(M2);
            _versionRepository.InsertVersion(M3);

            _versionRepository.RemoveVersion(M3);

            List <VersionInfo> all = QueryVersionTable();

            Assert.AreEqual(2, all.Count);
            for (int i = 0; i < 2; i++)
            {
                Assert.AreEqual((i + 1), all[i].Version);
                Assert.AreEqual("Migration" + (i + 1), all[i].Info);
                Assert.AreEqual("default", all[i].MigrationGroup);
            }
        }