public static void UpdateMigration(this MigrationHistoryRowDetails historyRowDetails, RabbitMqMigration migration) { Guard.ArgumentNotNull(nameof(historyRowDetails), historyRowDetails); Guard.ArgumentNotNull(nameof(migration), migration); historyRowDetails.Hash = migration.CalculateHash(); historyRowDetails.DownOperations = migration.DownOperations; }
public void UpdateMigrationTest() { var historyRowDetail = new MigrationHistoryRowDetails { Name = "001_TestMigration" }; historyRowDetail.UpdateMigration(new TestMigration()); Assert.IsNotNull(historyRowDetail.Hash); Assert.IsNotNull(historyRowDetail.DownOperations); }