Hashcodes added for classs with Equals overrides for unit tests

This commit is contained in:
Jonathan Preddy
2014-07-23 16:27:24 -04:00
parent 5bbd0300a5
commit 4fce441a04
2 changed files with 10 additions and 0 deletions

View File

@@ -175,6 +175,11 @@ namespace TimberWinR.Filters
// Return true if the fields match: // Return true if the fields match:
return (Field == p.Field) && (Value == p.Value); return (Field == p.Field) && (Value == p.Value);
} }
public override int GetHashCode()
{
return Field.GetHashCode() + Value.GetHashCode();
}
} }
private void ParseAddTags(XElement parent) private void ParseAddTags(XElement parent)

View File

@@ -72,6 +72,11 @@ namespace TimberWinR.Inputs
// Return true if the fields match: // Return true if the fields match:
return (Name == p.Name) && (FieldType == p.FieldType); return (Name == p.Name) && (FieldType == p.FieldType);
} }
public override int GetHashCode()
{
return Name.GetHashCode() + FieldType.GetHashCode();
}
} }
public class FieldDefinitions : IEnumerable<FieldDefinition> public class FieldDefinitions : IEnumerable<FieldDefinition>