public void GetArticlesOfOtherWritersAndStatusNegativeStatus()
        {
            ArticlesController ar = new ArticlesController();
            IEnumerable<tbl_Articles> articles = ar.GetArticlesOfOtherWritersAndStatus("Leli", -5);

            Assert.AreEqual(0,articles.Count());
        }
        public void GetArticlesOfOtherWritersAndStatusNonExistingUser()
        {
            ArticlesController ar = new ArticlesController();
            IEnumerable<tbl_Articles> articles = ar.GetArticlesOfOtherWritersAndStatus("kaopsdkaospkpdoopap", 5);

            Assert.IsNull(articles);
        }
        public void GetArticlesOfOtherWritersAndStatusEmptyUsername()
        {
            ArticlesController ar = new ArticlesController();
            IEnumerable<tbl_Articles> articles = ar.GetArticlesOfOtherWritersAndStatus(String.Empty,5);

            Assert.AreEqual(0,articles.Count());
        }
 public void ReadArticleWithWrongId()
 {
     SteveDelezioSEAssignment2Sit1.MyService.ServiceManager ms = new SteveDelezioSEAssignment2Sit1.MyService.ServiceManager();
     DataContext db = new DataContext();
     ArticlesController ac = new ArticlesController();
     tbl_Articles testarticle = new tbl_Articles();
     try
     {
         testarticle = ac.GetArticleById(-11);
     }
     finally
     {
         Assert.AreEqual(String.Empty, testarticle.ArticleContent);
     }
 }
 public void ListArticlesNonValidStatus()
 {
     ArticlesController ac = new ArticlesController();
     IEnumerable<tbl_Articles> articles= new List<tbl_Articles>();
     try
     {
         articles = ac.GetArticlesOfOtherWritersAndStatus("Leli", 200);
     }
     finally
     {
          Assert.AreEqual(0,articles.Count());
     }
 }
 public void ListArticlesNonExistingUser()
 {
     IEnumerable<tbl_Articles> articles= new List<tbl_Articles>();
     try
     {
         ArticlesController ac = new ArticlesController();
         articles = ac.GetArticlesOfOtherWritersAndStatus("", 5);
     }
     finally
     {
         Assert.AreEqual(0,articles.Count());
     }
 }
 public void ListArticles()
 {
     ArticlesController ac = new ArticlesController();
        IEnumerable<tbl_Articles> articles= ac.GetArticlesOfOtherWritersAndStatus("Leli", 5);
        Assert.IsNotNull(articles);
 }