private PaticipationHistory Save() { PaticipationHistory ph = new PaticipationHistory() { User = new User(), Project = new Project(), }; uow.PaticipationHistories.Add(ph); uow.Save(); return(ph); }
public void DisactivatePaticipationHistory(long userId, long projectId) { PaticipationHistory ph = uow.PaticipationHistories. GetByUserAndProjectId(userId, projectId, true).FirstOrDefault(); if (ph == null) { throw new PaticipationHistoryException(excpetion); } ph.IsActive = false; ph.FinishDate = DateTime.Now; uow.PaticipationHistories.Update(ph); uow.Save(); }
public void IsExistActiveTest() { PaticipationHistory ph = Save(); Assert.IsTrue(uow.PaticipationHistories.IsExistActive(ph.User.Id, ph.Project.Id)); }