Example #1
0
 public Voluntario(VoluntarioDto voluntarioDto)
 {
     voluntarioDto.ValidarELancarExcessao();
     IdUsuario               = voluntarioDto.IdUsuario;
     IdInstituicao           = voluntarioDto.IdInstituicao;
     _preferenciasDeTrabalho = voluntarioDto.PreferenciasDeTrabalho;
     Ativo = false;
 }
Example #2
0
        public void Usuario_deve_lancar_excessao_caso_não_seja_informado_algum_dos_campos_obrigatorios(VoluntarioDto voluntarioDto, string mensagem)
        {
            //Act
            Action act = () => new Voluntario(voluntarioDto);

            //Assert
            act.Should().Throw <InvalidOperationException>()
            .WithMessage(mensagem);
        }