public void Configs_with_same_name_and_tags_should_have_same_hash_code() { var config1 = new MonitorConfig("Test", new[] { new Tag("tag", "value") }); var config2 = new MonitorConfig("Test", new[] { new Tag("tag", "value") }); config1.GetHashCode().Should().Be(config2.GetHashCode()); }
public override int GetHashCode() { int result = config.GetHashCode(); result = 31 * result + (int)(timestamp ^ ((long)((ulong)timestamp >> 32))); result = 31 * result + value.GetHashCode(); return(result); }