public void MedicalDataControllerGetList() { var mock = new Mock <IMedicalDataRepository>(); var controller = new MedicalDataController(mock.Object); var data = controller.Get(); mock.Verify(x => x.GetMedicalDataList(), Times.Once); Assert.IsType <ActionResult <List <MedicalData> > >(data); }
public void MedicalDataControllerGet() { var newId = new Guid(); var mock = new Mock <IMedicalDataRepository>(); var controller = new MedicalDataController(mock.Object); var data = controller.Get(newId.ToString()); mock.Verify(x => x.GetMedicalData(newId.ToString()), Times.Once); Assert.IsType <ActionResult <MedicalData> >(data); }