Ejemplo n.º 1
0
        public void RollForward_WhenMigrationOccurs_IssuesNotification()
        {
            var version       = 1;
            var targetVersion = 2;
            var migrations    = migrator.LoadMigrations("fixtures");

            provider.Setup(x => x.GetVersion()).Returns(version);
            migrator.SetNotifier(notifier.Object);

            migrator.RollForward(targetVersion);

            notifier.Verify(x => x.Notify(migrations[2], Direction.Up), Times.Once);
            notifier.Verify(x => x.Notify(migrations[2], Direction.Down), Times.Never);
        }