public void AnEmptyHashListShouldReturnFalseForInvalidHash() { var migrations = new List <Migration> { new Migration("2006", "asdf", ""), new Migration("2007", "fdsa", "") }; var db = new MigrationTracker(migrations, new Dictionary <string, string>()); Assert.IsFalse(db.IsHashMismatch()); }
public void ShouldBeValidStateIfAllHashesAreTheSame() { var migrations = new[] { new Migration("2006", "asdf", ""), new Migration("2007", "fdsa", "") }; var hash = new Dictionary <string, string>(); foreach (var mig in migrations) { hash.Add(mig.Version, mig.Hash); } var db = new MigrationTracker(migrations, hash); Assert.IsTrue(!db.IsHashMismatch()); Assert.IsTrue(db.IsValidState()); }