Ejemplo n.º 1
0
        public void GetAllArticles()
        {
            //arrange
            List <Article> articles = new List <Article>();

            //act
            try
            {
                articles = databaseDriver.GetAllArticles();
            }
            catch (Exception ex)
            {
                Assert.Fail("Couldnt retrieve list of articles:\n" + ex.Message);
            }
            //assert
            Assert.IsNotNull(articles, "List of articles does not exists");
            Assert.AreEqual(9, articles.Count, "Retrieved number of rows is not as expected");
            Assert.AreEqual("Article from supplier1_3", articles[2].Name_of_article, "Retrieved value does not match excpected one");
        }