예제 #1
0
        public void GetAllByName()
        {
            // Arrange
            var    mockService = new Mock <IPatientService>();
            var    controller  = new PatientController(mockService.Object);
            string name        = "פנינה";

            // Act
            IQueryable <PatientModel> response = controller.GetAllByName(name);

            // Assert
            Assert.IsNotNull(response);
            Assert.AreEqual(response.Where(x => x.FirstName.Contains(name) || x.LastName.Contains(name)).Count(), response.Count());
        }