public void TestSiteLink() { SiteLink siteLink = new SiteLink("enwiki", "Test"); Assert.Equal("enwiki", siteLink.SiteId); Assert.Equal("Test", siteLink.PageName); Assert.Equal(0, siteLink.Badges.Count); }
public void TestRemoveBadge() { SiteLink siteLink = new SiteLink( "enwiki", "Test", new HashSet<ItemId> { new ItemId("Q12"), new ItemId("Q13") } ); siteLink.Badges.Remove(new ItemId("Q13")); Assert.Equal(1, siteLink.Badges.Count); Assert.False(siteLink.Badges.Contains(new ItemId("Q13"))); }
public void TestAddBadge() { SiteLink siteLink = new SiteLink( "enwiki", "Test", new HashSet<ItemId> { new ItemId("Q12"), new ItemId("Q13") } ); siteLink.Badges.Add(new ItemId("Q14")); Assert.Equal(3, siteLink.Badges.Count); Assert.True(siteLink.Badges.Contains(new ItemId("Q14"))); }