private void Assert_Are_Equal(Net.Feature.Feature left, Net.Feature.Feature right) { Assert.AreEqual(left, right); Assert.IsTrue(left.Equals(right)); Assert.IsTrue(right.Equals(left)); Assert.IsTrue(left.Equals(left)); Assert.IsTrue(right.Equals(right)); Assert.IsTrue(left == right); Assert.IsTrue(right == left); Assert.IsFalse(left != right); Assert.IsFalse(right != left); Assert.AreEqual(left.GetHashCode(), right.GetHashCode()); }
private void Assert_Are_Equal <TGeometry, TProps>(Net.Feature.Feature <TGeometry, TProps> left, Net.Feature.Feature <TGeometry, TProps> right) where TGeometry : IGeometryObject { Assert.AreEqual(left, right); Assert.IsTrue(left.Equals(right)); Assert.IsTrue(right.Equals(left)); Assert.IsTrue(left.Equals(left)); Assert.IsTrue(right.Equals(right)); Assert.IsTrue(left == right); Assert.IsTrue(right == left); Assert.IsFalse(left != right); Assert.IsFalse(right != left); Assert.AreEqual(left.GetHashCode(), right.GetHashCode()); }
public void Feature_Equals_Itself_Issue94() { bool equal1 = false; bool equal2 = false; var feature = new Net.Feature.Feature(new Point(new Position(12, 123))); Assert.DoesNotThrow(() => { equal1 = feature == feature; equal2 = feature.Equals(feature); }); Assert.IsTrue(equal1); Assert.IsTrue(equal2); }
public void Feature_Equals_Null_Issue94() { bool equal1 = true; bool equal2 = true; var feature = new Net.Feature.Feature(new Point(new Position(12, 123))); Assert.DoesNotThrow(() => { equal1 = feature.Equals(null); equal2 = feature == null; }); Assert.IsFalse(equal1); Assert.IsFalse(equal2); }
public void Feature_Equals_All_Geometry_Null_Issue115() { bool equal1 = false; bool equal2 = false; var feature1 = new Net.Feature.Feature(null); var feature2 = new Net.Feature.Feature(null); Assert.DoesNotThrow(() => { equal1 = feature1 == feature2; equal2 = feature1.Equals(feature2); }); Assert.IsTrue(equal1); Assert.IsTrue(equal2); }
public void Feature_Equals_Other_Geometry_Null_Issue115() { bool equal1 = false; bool equal2 = false; var feature1 = new Net.Feature.Feature(new Point(new Position(12, 123))); var feature2 = new Net.Feature.Feature(null); Assert.DoesNotThrow(() => { equal1 = feature1 == feature2; equal2 = feature1.Equals(feature2); }); Assert.IsFalse(equal1); Assert.IsFalse(equal2); }
public void Feature_Equals_Itself_Issue94() { bool equal1 = false; bool equal2 = false; var feature = new Net.Feature.Feature(new Point(new Position(12, 123))); Assert.DoesNotThrow(() => { #pragma warning disable CS1718 // Comparison made to same variable equal1 = feature == feature; #pragma warning restore CS1718 // Comparison made to same variable equal2 = feature.Equals(feature); }); Assert.IsTrue(equal1); Assert.IsTrue(equal2); }