コード例 #1
0
ファイル: NodeInfo.cs プロジェクト: xujyan/brunet
 public void RoundTrip(NodeInfo ni) {
   NodeInfo ni_other = NodeInfo.CreateInstance(ni.Address, ni.Transports);
   Assert.AreEqual(ni, ni_other, "Hashtable roundtrip");
   Assert.AreEqual(ni.GetHashCode(), ni_other.GetHashCode(), "Hashtable GetHashCode roundtrip");
 }
コード例 #2
0
ファイル: NodeInfo.cs プロジェクト: xujyan/brunet
 public void RoundTripHT(NodeInfo ni) {
   NodeInfo ni_other = NodeInfo.CreateInstance( ni.ToDictionary() );
   Assert.AreEqual(ni, ni_other, "Hashtable roundtrip");
   Assert.AreEqual(ni.GetHashCode(), ni_other.GetHashCode(), "Hashtable GetHashCode roundtrip");
 }