Пример #1
0
        public void RemoveTest()
        {
            CandidateSessionService.Remove(Candidate.Id, Session.Id);
            var removed = CandidateSessionService.GetFromIdPair(Candidate.Id, Session.Id);

            Assert.AreEqual(removed.Id, -1);
        }
Пример #2
0
 public CandidateSessionServiceTest()
 {
     TecAppContext           = new TecAppContext();
     CandidateService        = new EmployeeService.CandidateService(TecAppContext);
     SessionService          = new SessionService.SessionService(TecAppContext);
     CandidateSessionService = new CandidateSessionService(TecAppContext);
 }
Пример #3
0
        public void AddTest()
        {
            var random     = new Random();
            var candidates = CandidateService.GetAllCandidates();
            var sessions   = SessionService.GetAllSessions();

            Candidate        = CandidateService.GetAllCandidates()[random.Next(100)];
            Session          = SessionService.GetAllSessions()[random.Next(100)];
            CandidateSession = CandidateSessionService.Add(new Candidate_Session()
            {
                Candidate = Candidate,
                Session   = Session,
            });
        }
Пример #4
0
        public void GetTest()
        {
            var added = CandidateSessionService.GetFromIdPair(Candidate.Id, Session.Id);

            Assert.AreEqual(added.Id, CandidateSession.Id);
        }