package ru.VirtaMarketAnalyzer.parser;

import org.junit.jupiter.api.Test;
import ru.VirtaMarketAnalyzer.data.*;
import ru.VirtaMarketAnalyzer.main.Wizard;

import java.util.List;

import static org.junit.jupiter.api.Assertions.assertFalse;

/**
 * Created by cobr123 on 08.02.2019.
 */
public class TradeGuideParserTest {

    @Test
    void collectByTradeAtCitiesTest() throws Exception {
        final String realm = "olga";
        final List<ProductCategory> productCategories = ProductInitParser.getTradeProductCategories(Wizard.host, realm);
        final List<TradeGuide> tradeGuides = TradeGuideParser.genTradeGuide(Wizard.host, realm, productCategories.get(0));
        assertFalse(tradeGuides.isEmpty());
    }
}

@@ -33,16 +33,139 @@
 arser;%0A%0A
+import org.apache.log4j.BasicConfigurator;%0Aimport org.apache.log4j.ConsoleAppender;%0Aimport org.apache.log4j.PatternLayout;%0A
 import o
@@ -191,16 +191,16 @@
 i.Test;%0A
-
 import r
@@ -356,16 +356,75 @@
 rtFalse;
+%0Aimport static org.junit.jupiter.api.Assertions.assertTrue;
 %0A%0A/**%0A *
@@ -566,16 +566,132 @@
 ption %7B%0A
+        BasicConfigurator.configure(new ConsoleAppender(new PatternLayout(%22%25d%7BISO8601%7D %5B%25t%5D %25p %25C%7B1%7D %25x - %25m%25n%22)));%0A
         
@@ -959,24 +959,24 @@
 es.get(0));%0A
-
         asse
@@ -1003,20 +1003,113 @@
 isEmpty());%0A
+        assertTrue(tradeGuides.stream().anyMatch(l -%3E !l.getTradeGuideProduct().isEmpty()));%0A
     %7D%0A%7D%0A

простая проверка заполнения