public void TestIntersection() { var sum = 0; Parallel.ForEach(polygons, polygon => { var result = relations.STIntersects(polygon.Geom, exclude: polygon.HarbourId); sum += result.Count(); Assert.IsTrue(!result.Any(r => r.Value == polygon.HarbourId)); }); Assert.IsTrue(sum > 0); }