public void ForceMigrationsAttribute_AlreadyCommittedToLog_DoNotCommitAgain()
        {
            var log        = Substitute.For <IMigrationLog>();
            var logFactory = Substitute.For <IMigrationLogFactory>();

            logFactory.Create().ReturnsForAnyArgs(log);

            var m = new F1Migration();

            var sut = new MigrationService(new DefaultMigrationLocator(), logFactory, GetMigrationFactorySubstitute(m));

            log.IsCommited(typeof(F1Migration)).Returns(true);

            sut.Apply <F1Migration>();

            log.DidNotReceive().Commit(Arg.Any <F1Migration>());
        }
        public void ForceMigrationsAttribute()
        {
            var log        = Substitute.For <IMigrationLog>();
            var logFactory = Substitute.For <IMigrationLogFactory>();

            logFactory.Create().ReturnsForAnyArgs(log);

            var m = new F1Migration();

            var sut = new MigrationService(new DefaultMigrationLocator(), logFactory, GetMigrationFactorySubstitute(m));

            log.IsCommited(typeof(F1Migration)).Returns(true);

            sut.Apply <FMigration>();

            Assert.Equal(1, m.Calls);
        }