Beispiel #1
0
 public Response GetConceptById(int id)
 {
     try
     {
         return(new Response
         {
             Data = Mapper.Map <ConceptDto>(_conceptRepository.GetById(id))
         });
     }
     catch (Exception e)
     {
         return(null);
     }
 }
Beispiel #2
0
        public void GetById_Returns_With_Empty_Data_If_The_Concept_With_ID_Does_Not_Exist()
        {
            A.CallTo(() => ConceptRepository.GetById(A <int> ._)).Returns(null);

            var response = Service.GetConceptById(1);

            Assert.Null(response.Data);
        }
 public Concept GetConceptById(int id)
 {
     return(_conceptRepository.GetById(id));
 }