Esempio n. 1
0
        public virtual void CreateComplementaryExam(string description, int period)
        {
            Assertion.IsFalse(string.IsNullOrEmpty(description), "Descrição não informada.").Validate();
            Assertion.GreaterThan(period, 0, "Periodo não informado.").Validate();

            var complementaryexam = new ComplementaryExam
            {
                Description = description,
                Period = period
            };

            ComplementaryExams.Add(complementaryexam);

            Assertion.IsTrue(ComplementaryExams.Contains(complementaryexam), "Exame complementar não foi inserido.").Validate();
        }
Esempio n. 2
0
 public static ComplementaryExamModel MapComplementaryExamModelFrom(ComplementaryExam complementaryExam)
 {
     Mapper.CreateMap<ComplementaryExam, ComplementaryExamModel>();
     return Mapper.Map<ComplementaryExam, ComplementaryExamModel>(complementaryExam);
 }