public void XbimPointDictionaryTest() { var a = _xbimGeometryCreator.CreatePoint(1.1, 3.333399999, 2.2, 0.0001); var b = _xbimGeometryCreator.CreatePoint(1.1, 3.333411111, 2.2, 0.0001); var c = _xbimGeometryCreator.CreatePoint(1.1, 3.3341111, 2.2, 0.0001); var d = _xbimGeometryCreator.CreatePoint(3.3341111, 1.1, 2.2, 0.0001); var pointSet = new ConcurrentDictionary <IXbimPoint, string>(); Assert.IsTrue(pointSet.TryAdd(a, "a")); Assert.IsFalse(pointSet.TryAdd(b, "b")); Assert.IsTrue(pointSet.Count == 1, "Duplicate point added"); Assert.IsTrue(pointSet.ContainsKey(b), "Point lookup failed"); Assert.IsTrue(pointSet.TryAdd(c, "c")); Assert.IsTrue(pointSet.TryAdd(d, "d")); Assert.IsTrue(pointSet.ContainsKey(c), "Point lookup failed"); Assert.IsTrue(pointSet.ContainsKey(d), "Point lookup failed"); Assert.IsTrue(pointSet.Count == 3, "New point failed to be added"); }