/// <summary>
 /// Save the specified pQuestionsSet.
 /// </summary>
 /// <param name="pQuestionsSet">Questions set DTO.</param>
 public ResponseDTO <object> SaveQuestionsSet(QuestionsSetDTO pQuestionsSet)
 {
     try
     {
         QuestionsSet modifiedQuestionsSet = _mapper.Map <QuestionsSet>(pQuestionsSet);
         return(_questionsSetService.Save(modifiedQuestionsSet));
     }
     catch (Exception ex)
     {
         _logger.Error(ex, $"Failed to save QuestionsSet. {ex.Message}");
         return(ResponseDTO.InternalError(ErrorMessageHelper.FailedOperation("saving questions set")));
     }
 }
Beispiel #2
0
 public void SaveShouldThrowNullReferenceException()
 {
     Assert.Throws <NullReferenceException>(() => _service.Save(null));
 }