// I tried to make this generic and call it for both the Geometry, and Geography base // classes, but then it wouldn't call the correct == and != operators, kept calling the one on Object. private static void GeographyEqualityTestIncludingBaseObviousStuff(Func<Geography> create, Func<Geography> createEmpty) { Geography instance = create(); Assert.False(instance.Equals(null)); Assert.True(instance.Equals(instance)); var instance2 = create(); Assert.True(instance.Equals(instance2)); var empty = createEmpty(); Assert.False(instance.Equals(empty)); Assert.False(empty.Equals(instance)); var empty2 = createEmpty(); Assert.True(empty.Equals(empty2)); Assert.NotEqual(0, instance.GetHashCode()); }