public void StartNewTerm()
        {
            if (!CurrentTerm.CanBeClosed())
                throw new TermException();

            CloseCurrentTerm();
            _termRepository.Save(CurrentTerm);

            CurrentTerm = new Term(CurrentTerm.Id + 1) {Sum = _user.Sum};
        }
        public EnvironmentTests()
        {
            _someTerm = new Term(21);

            _termRepository = new Mock<ITermRepository>();
            _termRepository.Setup(x => x.GetPendingTerm())
                .Returns(_someTerm);

            _environment = new TermEnvironment(_termRepository.Object, new User());
        }
 public void Save(Term term)
 {
     _terms.Add(term);
 }