Exemplo n.º 1
0
 /*
  *  GetById()
  *  ViewModel Layer of GetById, calls the ProblemDAO's GetByProblemId method
  *  Uses the passed Id and calls the related method in the DAO based on the id
  */
 public void GetById()
 {
     try
     {
         Problem prob = _dao.GetByProblemId(Id);
         Id          = prob.GetIdAsString();
         Description = prob.Description;
         Version     = prob.Version;
     }
     catch (Exception ex)
     {
         ViewModelUtils.ErrorRoutine(ex, "ProblemViewModel", "GetById");
     }
 }
Exemplo n.º 2
0
        public void TestGetByProblemIdShouldReturnProblem()
        {
            ProblemDAO dao = new ProblemDAO();

            Assert.IsInstanceOfType(dao.GetByProblemId(pid), typeof(Problem));
        }