public void GetAllFilterByPatient_Test()
        {
            // Arrange
            TestKolgraphEntities context = new TestKolgraphEntities();
            var repository = new HitchayvutRepository(context);
            int patientId  = 1;

            // Act
            IEnumerable <hitchayvut> result = repository.GetAllFilterByPatient(patientId);

            // Assert
            Assert.AreEqual(context.hitchayvut.Where(x => x.patientId == patientId).Count(), result.Count());
        }
        public void GetAll_Test()
        {
            // Arrange
            TestKolgraphEntities context = new TestKolgraphEntities();
            var repository = new HitchayvutRepository(context);

            // Act
            IEnumerable <hitchayvut> result = repository.GetAll();

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(context.hitchayvut.Count(), result.Count());
        }
        public void GetById_Test()
        {
            // Arrange
            TestKolgraphEntities context = new TestKolgraphEntities();
            var repository = new HitchayvutRepository(context);
            int id         = 1;

            // Act
            hitchayvut result = repository.GetById(id);

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(id, result.id);
        }
Beispiel #4
0
        public void GetById_Test()
        {
            // Arrange
            TestKolgraphEntities context = new TestKolgraphEntities();
            var repository = new HitchayvutRepository(context);
            var service    = new HitchayvutService(repository);
            int id         = 1;

            // Act
            HitchayvutModel result = service.GetById(id);

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(id, result.Id);
        }