Esempio n. 1
0
        public static List <Article> Articles()
        {
            HttpResponseMessage response = GetMethod(AdressList.ArticlesAdmin);

            if (response.StatusCode == HttpStatusCode.OK)
            {
                return(ArticleListCreator.CreateArticles(response));
            }
            else
            {
                return(new List <Article>());
            }
        }
Esempio n. 2
0
 public void EmptyResponse()
 {
     Assert.Throws <NullReferenceException> (() => ArticleListCreator.CreateArticles(new HttpResponseMessage()));
 }