Ejemplo n.º 1
0
        public void GetAllFilterByBranchId()
        {
            // Arrange
            var mockService = new Mock <IPatientService>();
            var controller  = new PatientController(mockService.Object);
            int branchId    = 1;

            // Act
            IQueryable <PatientModel> response = controller.GetByBranchId(branchId);

            // Assert
            Assert.IsNotNull(response);
            Assert.AreEqual(response.Where(x => x.Branch.Id == branchId).Count(), response.Count());
        }