public void IComparerTestMethod() { NodeDescriptorBase _new = NodeDescriptor.GetTestInstance(); Assert.IsNotNull(_new); Assert.IsNotNull(_new.NodeIdentifier); NodeDescriptorBase _Other = NodeDescriptor.GetTestInstance(); Assert.IsNotNull(_new); Assert.IsNotNull(_new.NodeIdentifier); Assert.AreEqual <int>(0, _new.CompareTo(_Other)); Assert.AreEqual <NodeDescriptorBase>(_new, _Other); }
public void DictionaryTestMethod() { NodeDescriptorBase _new = NodeDescriptor.GetTestInstance(); Assert.IsNotNull(_new); Assert.IsNotNull(_new.NodeIdentifier); NodeDescriptorBase _Other = NodeDescriptor.GetTestInstance(); Assert.IsNotNull(_new); Assert.IsNotNull(_new.NodeIdentifier); Assert.AreEqual <int>(0, _new.CompareTo(_Other)); Assert.AreEqual <NodeDescriptorBase>(_new, _Other); Dictionary <NodeDescriptorBase, NodeDescriptorBase> _newDic = new Dictionary <NodeDescriptorBase, NodeDescriptorBase>(); _newDic.Add(_new, _new); Assert.IsTrue(_newDic.ContainsKey(_new)); Assert.IsTrue(_newDic.ContainsKey(_Other)); _newDic.Add(_new, _Other); }