Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Test (description = "SRL-1052. Если пакет с РА полностью сохранен корректно, то запрашиваемый статус пакета будет 3",
- dataProvider = "магазины")
- public void importActionWithoutPeriod(String target){
- StringBuffer request = new StringBuffer();
- request.append("<AdvertisingActions>\n" +
- " <AdvertisingAction name=\"Without Period\" active=\"true\" mode=\"automatic\" worksAnyTime=\"false\" сolor=\"Red\">\n" +
- " <begin-date>2012-02-21T00:00:00Z</begin-date>\n" +
- " <end-date>2025-02-20T00:00:00Z</end-date>\n" +
- " <externalConditions>\n" +
- " <action-results-quantity-condition allowOffline=\"false\">\n" +
- " <action-restriction max-value=\"1\"/>\n" +
- " <client-restriction max-value=\"1\" restriction-period-type=\"SOMS\"/>\n" +
- " </action-results-quantity-condition>\n" +
- " </externalConditions>\n" +
- " <actionResults> <calculation value-type=\"PERCENT\" value = \"10\"/></actionResults>\n" +
- " </AdvertisingAction>\n" +
- "</AdvertisingActions>");
- WSAdvActions wsActions = new WSAdvActions(target);
- String ti = wsActions.importAdvActions(request.toString(), false);
- WSFeedback feedback = new WSFeedback(target);
- System.out.println("!!!!!!!!!ЭТО ПОШЛИ ЛОГИ!!!!!!!!!!"+ ti);
- System.out.println(TransportPackageStatusEnum.CORRECT.getName());
- log.info("!!!!!!!!!ЭТО ПОШЛИ ЛОГИ!!!!!!!!!!"+ti);
- log.info(TransportPackageStatusEnum.CORRECT.getName());
- Assert.assertTrue(feedback.assertSOAPResponse(TransportPackageStatusEnum.CORRECT.getName(), ti));
- }
- @Test (description = "SLS-218. Если в РА нулевое значение ограничений то сервер выбрасывает ошибку",
- dataProvider = "магазины")
- public void importActionZeroActionRestriction(String target){
- StringBuffer request = new StringBuffer();
- request.append("<AdvertisingActions>\n" +
- " <AdvertisingAction name=\"Without Period\" active=\"true\" mode=\"automatic\" worksAnyTime=\"false\" сolor=\"Red\">\n" +
- " <begin-date>2012-02-21T00:00:00Z</begin-date>\n" +
- " <end-date>2025-02-20T00:00:00Z</end-date>\n" +
- " <externalConditions>\n" +
- " <action-results-quantity-condition allowOffline=\"false\">\n" +
- " <action-restriction max-value=\"0\"/>\n" +
- " <client-restriction max-value=\"1\" restriction-period-type=\"SOMS\"/>\n" +
- " </action-results-quantity-condition>\n" +
- " </externalConditions>\n" +
- " <actionResults> <calculation value-type=\"PERCENT\" value = \"10\"/></actionResults>\n" +
- " </AdvertisingAction>\n" +
- "</AdvertisingActions>");
- WSAdvActions wsActions = new WSAdvActions(target);
- String ti = wsActions.importAdvActions(request.toString(), false);
- WSFeedback feedback = new WSFeedback(target);
- System.out.println("!!!!!!!!!ЭТО ПОШЛИ ЛОГИ!!!!!!!!!!"+ ti);
- System.out.println(TransportPackageStatusEnum.XML_ERROR.getName());
- log.info("!!!!!!!!!ЭТО ПОШЛИ ЛОГИ!!!!!!!!!!"+ti);
- log.info(TransportPackageStatusEnum.XML_ERROR.getName());
- Assert.assertTrue(feedback.assertSOAPResponse(TransportPackageStatusEnum.XML_ERROR.getName(), ti));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement