public void GetCheckedInConsultantMethod_ShouldReturn_Null_IfCheckedInConsultants_Is_Empty() { var reg = "099040"; CheckInOutImplementation implementation = new CheckInOutImplementation(); CheckinCheckoutDTO checkinCheckoutDTOs = null; var mockCheckin = new Mock <ICheckInOut>(); mockCheckin.Setup(c => c.GetCheckedInConsultant(reg)).Returns(Task.FromResult <CheckinCheckoutDTO>(checkinCheckoutDTOs)); Assert.AreEqual(checkinCheckoutDTOs, null); }
public void GetCheckedInConsultantMethod_Should_Return_CheckedInConsultants_IfNotEmpty() { CheckInOutImplementation implementation = new CheckInOutImplementation(); var consultant = new CheckinCheckoutDTO { }; var mockCheckin = new Mock <ICheckInOut>(); mockCheckin.Setup(c => c.GetCheckedInConsultant(consultant.ConsultantRegID)).Returns(Task.FromResult <CheckinCheckoutDTO>(consultant)); Assert.AreNotEqual(consultant, null); }