예제 #1
0
        public void TestEquals()
        {
            ItemId itemId = new ItemId("Q42");

            Assert.True(itemId.Equals(new ItemId("Q42")));
            Assert.False(itemId.Equals(new ItemId("Q123")));
        }
예제 #2
0
 public Item(ItemId id = null, Fingerprint fingerprint = null, List<Statement> statements = null, List<SiteLink> sitelinks = null)
 {
     Id = id;
     Fingerprint = fingerprint == null ? new Fingerprint() : fingerprint;
     Statements = statements == null ? new List<Statement>() : statements;
     Sitelinks = new IndexedList<string, SiteLink>(siteLink => siteLink.SiteId, sitelinks);
 }
예제 #3
0
 public void TestValidSerialization()
 {
     ItemId itemId = new ItemId("Q42");
     Assert.Equal("Q42", itemId.Serialization);
 }