Created
August 5, 2013 23:04
-
-
Save marciojrtorres/6160446 to your computer and use it in GitHub Desktop.
Para programar por intenção devemos expor a intenção
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// as classes em negrito não existem ainda | |
public class CreditoService { | |
public CreditoCheck checaCredito(TipoDocumento tipo, String documento) { | |
CreditoCheck creditoCheck = null; | |
if (tipo == TipoDocumento.CPF) { | |
creditoCheck = CreditoCheck.fromDivida(ws.checaCPF(documento)); | |
} else if (tipo == TipoDocumento.RG) { | |
creditoCheck = CreditoCheck.fromDivida(ws.checaRG(documento)); | |
} | |
return creditoCheck; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment