public static List <Article> Articles() { HttpResponseMessage response = GetMethod(AdressList.ArticlesAdmin); if (response.StatusCode == HttpStatusCode.OK) { return(ArticleListCreator.CreateArticles(response)); } else { return(new List <Article>()); } }
public void EmptyResponse() { Assert.Throws <NullReferenceException> (() => ArticleListCreator.CreateArticles(new HttpResponseMessage())); }