public void ExtractIdFromUrlShouldWorkCorrectly() { var provider = new ApiBgSource(); var result = provider.ExtractIdFromUrl("http://www.api.bg/index.php/bg/prescentar/novini/podpapka/druga-podpapka/filename"); Assert.Equal("filename", result); }
public void ExtractIdFromUrlShouldWorkCorrectly(string url, string id) { var source = new ApiBgSource(); var result = source.ExtractIdFromUrl(url); Assert.Equal(id, result); }
public void ExtractIdFromUrlShouldWorkCorrectlyWithDashAtTheEnd() { var provider = new ApiBgSource(); var result = provider.ExtractIdFromUrl("http://www.api.bg/index.php/bg/prescentar/novini/10-sa-kandidatite-za-izrabotvane-na-tehnicheski-proekt-pri-rehabilitaciyata-na-31-km-ot-pt-iii-861-ii-86-yugovo-lki-zdravec/"); Assert.Equal("10-sa-kandidatite-za-izrabotvane-na-tehnicheski-proekt-pri-rehabilitaciyata-na-31-km-ot-pt-iii-861-ii-86-yugovo-lki-zdravec", result); }