public void GetAllPatients_Should_Empty() { // Arrange var service = new ReferralService(); // Act var patients = service.GetAllPatients(); // Assert patients.ShouldBeEmpty(); }
public void GetAllPatients_Should_Return_Patients() { // Arrange using (var context = new EReferralContext()) { context.Patients.Add(new Patient { Email = "*****@*****.**" }); context.Patients.Add(new Patient { Email = "*****@*****.**" }); context.SaveChanges(); } var service = new ReferralService(); // Act var patients = service.GetAllPatients(); // Assert patients.ShouldNotBeNull(); patients.Count.ShouldEqual(2); }