Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. package py.com.personal.bc.recargacontrafactura.test;
  2.  
  3. import javax.inject.Inject;
  4.  
  5. import org.junit.Test;
  6. import org.junit.runner.RunWith;
  7.  
  8. import py.com.personal.bc.recarga.mensajes.model.RespuestaRecarga;
  9. import py.com.personal.bc.recargacontrafactura.business.RecargaContraFacturaBusiness;
  10. import py.com.personal.bc.recargacontrafactura.exceptions.RespuestaRecargaMontos;
  11. import py.com.personal.bc.testingse.runner.CDIJUnitRunner;
  12. import py.com.personal.bc.testingse.util.RequiresThreadScope;
  13.  
  14. @RequiresThreadScope
  15. @RunWith(CDIJUnitRunner.class)
  16. public class RecargaContraFacturaTest {
  17.  
  18. @Inject
  19. RecargaContraFacturaBusiness recargaContraFacturaBusiness;
  20.  
  21. @Test
  22. public void testObtenerMontoMensual() throws Exception{
  23. System.out.println("TEST rfactura_obt_monto_mensual");
  24. String identificador = "981208818";
  25. String aplicacion = "*454";
  26. Object respuesta = recargaContraFacturaBusiness.obtenerMontoMensual(identificador, aplicacion, true);
  27. try{
  28. RespuestaRecargaMontos montos = (RespuestaRecargaMontos) respuesta;
  29. System.out.println("Respuesta TEST rfactura_obt_monto_mensual: " + montos.toString());
  30. }catch(Exception e){
  31. RespuestaRecarga respuestaRecarga = (RespuestaRecarga) respuesta;
  32. System.out.println("Respuesta TEST rfactura_obt_monto_mensual: {" +
  33. "codigoRespuesta: " + respuestaRecarga.getCodigoRespuesta() +
  34. ", descripcion: " + respuestaRecarga.getDescripcion() +
  35. ", fecha: " + respuestaRecarga.getFecha() + "}");
  36. }
  37. }
  38. @Test
  39. public void testRecFactAcreditar() throws Exception{
  40. System.out.println("TEST recarga_acreditar");
  41. String identificador = "981208818";
  42. Double monto = 15000d;
  43. Double porcentaje = 20d;
  44. String segmento = "A11";
  45. String aplicacion = "*454";
  46. RespuestaRecarga respuesta = recargaContraFacturaBusiness.acreditar(identificador, monto, porcentaje, segmento, aplicacion);
  47. System.out.println("Respuesta TEST recarfa_acreditar: {" +
  48. "codigoRespuesta: " + respuesta.getCodigoRespuesta() +
  49. ", descripcion: " + respuesta.getDescripcion() +
  50. ", fecha: " + respuesta.getFecha() + "}");
  51. }
  52.  
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement