GetWikipedaURL() public method

Creates a link to the Wikipedia article for this EntityID's ID if it is a QID. If the ID is not a QID, this method returns null.
public GetWikipedaURL ( ) : string
return string
Ejemplo n.º 1
0
 public void EntityIDTestLinkValidOnSet()
 {
     EntityID tidAtFirst = new EntityID("T423");
     Assert.AreEqual(null, tidAtFirst.GetWikipedaURL());
     tidAtFirst.ID = "Q2";
     Assert.AreEqual("https://en.wikipedia.org/wiki/Earth", tidAtFirst.GetWikipedaURL());
 }
Ejemplo n.º 2
0
 public void EntityIDTestPassOnCreate()
 {
     EntityID pass = new EntityID("Q1");
     pass.ID = "Q1";
     Assert.AreEqual("https://en.wikipedia.org/wiki/Universe", pass.GetWikipedaURL());
 }
Ejemplo n.º 3
0
 public void EntityIDLinkNullOnSetToNull()
 {
     EntityID eid = new EntityID(null);
     Assert.AreEqual(null, eid.GetWikipedaURL());
 }