Skip to content

Instantly share code, notes, and snippets.

@rinaldodev
Created March 22, 2019 13:06
Show Gist options
  • Save rinaldodev/6b00c02b74e5367abd9e2fd67d8bcd34 to your computer and use it in GitHub Desktop.
Save rinaldodev/6b00c02b74e5367abd9e2fd67d8bcd34 to your computer and use it in GitHub Desktop.
public class CadastroUsuarioService {
public void cadastrarNovoUsuario(Usuario usuario, String confirmacaoEmail, Boolean aceitouTermosDeUso) {
if (!aceitouTermosDeUso) {
// lança exceção de termos de uso
}
if (!usuario.getEmail().equals(confirmacaoEmail)) {
// lança exceção de emails diferentes
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment