Guest User

Untitled

a guest
Jun 19th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.85 KB | None | 0 0
  1. @Test(groups = {"regress", "PartialRepayment"},
  2. description = "createPartialRepayment. Поля запроса. PartialRepayment. Некорректный формат dateTimeReport")
  3. @TmsLink("TC-19492")
  4. public void createPartialRepaymentPartialRepaymentIncorrectFormatDateTimeReport() throws IOException {
  5. Application request = getSuccessApplication()
  6. .setDateTimeReport(INCORRECT_FORMAT_DATE);
  7. Response response = partialRepaymentServiceSteps.createPartialRepayment(partialRepaymentServiceConfig.getValidContractNumber(), TOMORROW_DATE, USER_NAME, request);
  8. commonSteps.assertFieldErrorProtocolIncorrect(response);
  9. }
  10.  
  11. @Test(groups = {"regress", "PartialRepayment"},
  12. description = "createPartialRepayment. Поля запроса. PartialRepayment. Некорректный формат closeOperatingDay")
  13. @TmsLink("TC-19492")
  14. public void createPartialRepaymentPartialRepaymentIncorrectFormatCloseOperatingDay() throws IOException {
  15. Application request = getSuccessApplication()
  16. .setCloseOperatingDay(INCORRECT_FORMAT_DATE);
  17. Response response = partialRepaymentServiceSteps.createPartialRepayment(partialRepaymentServiceConfig.getValidContractNumber(), TOMORROW_DATE, USER_NAME, request);
  18. commonSteps.assertFieldErrorProtocolIncorrect(response);
  19. }
  20.  
  21. @Test(groups = {"regress", "PartialRepayment"},
  22. description = "createPartialRepayment. Поля запроса. PartialRepayment. Некорректный формат partialRepaymentDate")
  23. @TmsLink("TC-19492")
  24. public void createPartialRepaymentPartialRepaymentIncorrectFormatPartialRepaymentDate() throws IOException {
  25. Application request = getSuccessApplication()
  26. .setPartialRepaymentDate(INCORRECT_FORMAT_DATE);
  27. Response response = partialRepaymentServiceSteps.createPartialRepayment(partialRepaymentServiceConfig.getValidContractNumber(), TOMORROW_DATE, USER_NAME, request);
  28. commonSteps.assertFieldErrorProtocolIncorrect(response);
  29. }
  30.  
  31.  
  32. private Application getSuccessApplication() {
  33. return new Application()
  34. .setDateTimeReport(DATE_TIME_REPORT)
  35. .setUserName(USER_NAME)
  36. .setContractNumber(partialRepaymentServiceConfig.getValidContractNumber())
  37. .setPartialRepaymentDate(TOMORROW_DATE)
  38. .setCloseOperatingDay(TOMORROW_DATE)
  39. .setUsingAccountBalance(Boolean.FALSE)
  40. .setPartialRepaymentAmount(PARTIAL_REPAYMENT_AMOUNT)
  41. .setCheckingBalanceOnRequestDate(FLOAT)
  42. .setCheckingBalanceOnExecutionDate(FLOAT)
  43. .setTotalAmount(FLOAT)
  44. .setPlannedRepaymentAmount(FLOAT)
  45. .setPlannedNextPayment(FLOAT)
  46. .setCalculationStatus(CALCULATION_STATUS);
  47. }
Add Comment
Please, Sign In to add comment