Example #1
0
        public void TestIndex()
        {
            var db         = new CS4PEEntities();
            var controller = new VLTeaController();
            var result     = controller.Index() as ViewResult;

            Assert.IsNotNull(result);
            var model = result.Model as List <BubleTea>;

            Assert.IsInstanceOfType(result.Model, typeof(List <BubleTea>));
            Assert.AreEqual(db.BubleTeas.Count(), (result.Model as List <BubleTea>).Count);
        }
Example #2
0
        public void TestIndex()
        {
            var db         = new AhihiEntities();
            var controller = new VLTeaController();
            var result     = controller.Index();

            var view = result as ViewResult;

            Assert.IsNotNull(view);
            var model = view.Model as List <BubleTea>;

            Assert.IsNotNull(model);
            Assert.AreEqual(db.BubleTeas.Count(), model.Count);
        }