Esempio n. 1
0
        public void Change(RecruitInfo recruitInfo)
        {
            if (recruitInfo == null)
            {
                throw new ArgumentNullException(nameof(recruitInfo));
            }

            var priz = RecruitInfoMapper.Map(recruitInfo);

            _prizCommand.Update(priz);
        }
Esempio n. 2
0
        public void UpdatePrizSQLiteTest()
        {
            var prizInMemory = SQLiteData.Build(1, 1, _photoExtension);

            AddPriz(prizInMemory);

            var prizInDb = _prizQuery.Get(prizInMemory.id);

            prizInDb.surname = "Иванов 1";

            using (var unitOfWork = _unitOfWorkFactory.Create())
            {
                _prizCommand.Update(prizInDb);
                unitOfWork.Commit();
            }

            var updatedPrizInDb = _prizQuery.Get(prizInMemory.id);

            Assert.AreEqual(prizInDb.surname, updatedPrizInDb.surname);
        }