コード例 #1
0
        public void GetRecipeById()
        {
            SqlRecipeManager srm = new SqlRecipeManager();
            Recipe r = new Recipe();
            int id=1;

            r = srm.GetRecipeById(id);

            Assert.AreEqual(id, r.Id);
        }
コード例 #2
0
        public void GetCommentsByRecipe()
        {
            SqlCommentManager scm = new SqlCommentManager();
            SqlRecipeManager srm = new SqlRecipeManager();
            Recipe r = new Recipe();

            r = srm.GetRecipeById(1);

            List<Comment> cl = scm.GetCommentsByRecipe(r);

            Assert.AreEqual(1, cl.Count);
        }