public void DeleteConfirmed_只在是否已刪除欄位改成是()
        {
            //Assign
            var controller = new 客戶資料StubController(mockRepo);
            //Act
            int id     = 0;
            var result = controller.DeleteConfirmed(id);

            //Assert
            Assert.AreEqual(4, customers.Count);
            Assert.AreEqual(true, customers[0].是否已刪除);
        }
        public void DeletedConfirmed_RedirectToIndex()
        {
            //Assign
            var controller = new 客戶資料StubController(mockRepo);
            //Act
            int id     = 0;
            var result = controller.DeleteConfirmed(id);

            //Assert
            Assert.IsInstanceOfType(result, typeof(RedirectToRouteResult));
            var redirectResult = result as RedirectToRouteResult;

            Assert.AreEqual("Index", redirectResult.RouteValues["action"]);
        }
        public void Index_不會顯示已經標示刪除的資料()
        {
            //Assign
            var controller = new 客戶資料StubController(mockRepo);

            //Act
            customers[0].是否已刪除 = true;
            ViewResult result = controller.Index(new 客戶資料篩選條件ViewModel()
            {
                keyword = "", Type = ""
            }) as ViewResult;
            List <客戶資料> data = result.Model as List <客戶資料>;

            //Assert
            Assert.AreEqual(3, data.Count);
        }