示例#1
0
        public void ConvertEntityToModel_Test()
        {
            // Arrange
            TestKolgraphEntities context = new TestKolgraphEntities();
            var     repository           = new PatientRepository(context);
            var     service = new PatientService();
            patient entity  = context.patient.Where(x => x.id == 1).FirstOrDefault();

            // Act
            PatientModel model = service.ConvertEntityToModel(entity);

            // Assert
            Assert.IsNotNull(model);
            Assert.AreEqual(model.Id, entity.id);
            Assert.AreEqual(model.Zehut, entity.zehut);
        }