public bool Equals(MigrationScriptFile other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return other.Version == Version; }
public void Equals_should_find_two_with_the_same_FilePath_equal() { // arrange const string path1 = "C:\\test\\123_my_migration_script.sql"; var script1 = new MigrationScriptFile(path1); const string path2 = "C:\\test\\123_my_migration_script.sql"; var script2 = new MigrationScriptFile(path2); // act bool result = script1.Equals(script2); // assertS Assert.IsTrue(result); }