コード例 #1
0
        public void GetAllFilterByCurrent_Test()
        {
            // Arrange
            var mockService = new Mock <IBranchService>();
            var controller  = new BranchController(mockService.Object);

            // Act
            IQueryable <BranchModel> response = controller.GetAll();

            Assert.AreEqual(response.Where(x => x.IsCurrent).Count(), response.Count());
        }
コード例 #2
0
        public void GetAll_Test()
        {
            // Arrange
            var mockService = new Mock <IBranchService>();
            var controller  = new BranchController(mockService.Object);

            // Act
            IQueryable <BranchModel> response = controller.GetAll();

            // Assert
            Assert.IsNotNull(response);
        }