public void GetDoctorsReturnDoctors() { //Arrange using (var DoctorController = new DoctorsController()) { //Act: Call the GetDoctors Method IEnumerable<DoctorModel> doctors = DoctorController.GetDoctors(); if (!doctors.Any()) Assert.Inconclusive(); //Assert Assert.IsTrue(doctors.Count() > 0); //Assert Assert.IsTrue(doctors.Where(d => d.Archived).Count() == 0); } }
public void GetArchivedDoctorReturnArchivedDoctors() { //Arrange using (var DoctorController = new DoctorsController()) { //Act: Call the GetDoctors Method IEnumerable<DoctorModel> doctors = DoctorController.GetDoctors(); //Assert if (doctors.Count() == 0) Assert.Inconclusive("No archived doctors found"); Assert.IsTrue(doctors.Count() > 0); Assert.IsTrue(doctors.Any(d => !d.Archived)); } }