public void CheckLink_NotLink() { const string url = "https://api.vk.com/method/utils.checkLink?url=hsfasfsf&access_token="; const string json = @"{ 'response': { 'status': 'not_banned', 'link': 'http://vk.com/' } }"; var utils = GetMockedUtilsCategory(url, json); LinkAccessType type = utils.CheckLink("hsfasfsf"); type.ShouldEqual(LinkAccessType.NotBanned); }
public void CheckLink_BannedLink() { const string url = "https://api.vk.com/method/utils.checkLink?url=http://www.kreml.ru/&access_token="; const string json = @"{ 'response': { 'status': 'banned', 'link': 'http://www.kreml.ru/' } }"; var utils = GetMockedUtilsCategory(url, json); LinkAccessType type = utils.CheckLink("http://www.kreml.ru/"); type.ShouldEqual(LinkAccessType.Banned); }