Advertisement
fedorm

Untitled

May 16th, 2019
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.25 KB | None | 0 0
  1.     @Test (description = "SRL-1052. Если пакет с РА полностью сохранен корректно, то запрашиваемый статус пакета будет 3",
  2.             dataProvider = "магазины")
  3.     public void importActionWithoutPeriod(String target){
  4.         StringBuffer  request = new StringBuffer();
  5.         request.append("<AdvertisingActions>\n" +
  6.                 "    <AdvertisingAction name=\"Without Period\" active=\"true\" mode=\"automatic\" worksAnyTime=\"false\" сolor=\"Red\">\n" +
  7.                 "        <begin-date>2012-02-21T00:00:00Z</begin-date>\n" +
  8.                 "        <end-date>2025-02-20T00:00:00Z</end-date>\n" +
  9.                 "        <externalConditions>\n" +
  10.                 "    <action-results-quantity-condition allowOffline=\"false\">\n" +
  11.                 "      <action-restriction max-value=\"1\"/>\n" +
  12.                 "      <client-restriction max-value=\"1\" restriction-period-type=\"SOMS\"/>\n" +
  13.                 "    </action-results-quantity-condition>\n" +
  14.                 "  </externalConditions>\n" +
  15.                 "        <actionResults> <calculation value-type=\"PERCENT\" value = \"10\"/></actionResults>\n" +
  16.                 "    </AdvertisingAction>\n" +
  17.                 "</AdvertisingActions>");
  18.  
  19.         WSAdvActions wsActions = new WSAdvActions(target);
  20.         String ti = wsActions.importAdvActions(request.toString(), false);
  21.  
  22.         WSFeedback feedback = new WSFeedback(target);
  23.         System.out.println("!!!!!!!!!ЭТО ПОШЛИ ЛОГИ!!!!!!!!!!"+ ti);
  24.         System.out.println(TransportPackageStatusEnum.CORRECT.getName());
  25.         log.info("!!!!!!!!!ЭТО ПОШЛИ ЛОГИ!!!!!!!!!!"+ti);
  26.         log.info(TransportPackageStatusEnum.CORRECT.getName());
  27.         Assert.assertTrue(feedback.assertSOAPResponse(TransportPackageStatusEnum.CORRECT.getName(), ti));
  28.     }
  29.  
  30.     @Test (description = "SLS-218. Если в РА нулевое значение ограничений то сервер выбрасывает ошибку",
  31.             dataProvider = "магазины")
  32.     public void importActionZeroActionRestriction(String target){
  33.         StringBuffer  request = new StringBuffer();
  34.         request.append("<AdvertisingActions>\n" +
  35.                 "    <AdvertisingAction name=\"Without Period\" active=\"true\" mode=\"automatic\" worksAnyTime=\"false\" сolor=\"Red\">\n" +
  36.                 "        <begin-date>2012-02-21T00:00:00Z</begin-date>\n" +
  37.                 "        <end-date>2025-02-20T00:00:00Z</end-date>\n" +
  38.                 "        <externalConditions>\n" +
  39.                 "    <action-results-quantity-condition allowOffline=\"false\">\n" +
  40.                 "      <action-restriction max-value=\"0\"/>\n" +
  41.                 "      <client-restriction max-value=\"1\" restriction-period-type=\"SOMS\"/>\n" +
  42.                 "    </action-results-quantity-condition>\n" +
  43.                 "  </externalConditions>\n" +
  44.                 "        <actionResults> <calculation value-type=\"PERCENT\" value = \"10\"/></actionResults>\n" +
  45.                 "    </AdvertisingAction>\n" +
  46.                 "</AdvertisingActions>");
  47.  
  48.         WSAdvActions wsActions = new WSAdvActions(target);
  49.         String ti = wsActions.importAdvActions(request.toString(), false);
  50.  
  51.         WSFeedback feedback = new WSFeedback(target);
  52.         System.out.println("!!!!!!!!!ЭТО ПОШЛИ ЛОГИ!!!!!!!!!!"+ ti);
  53.         System.out.println(TransportPackageStatusEnum.XML_ERROR.getName());
  54.         log.info("!!!!!!!!!ЭТО ПОШЛИ ЛОГИ!!!!!!!!!!"+ti);
  55.         log.info(TransportPackageStatusEnum.XML_ERROR.getName());
  56.  
  57.         Assert.assertTrue(feedback.assertSOAPResponse(TransportPackageStatusEnum.XML_ERROR.getName(), ti));
  58.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement