Projekt

Obecné

Profil

Stáhnout (1.12 KB) Statistiky
| Větev: | Revize:
1 0cc85c2d Lukáš Ščurko
package test;
2
3 27ba3ec6 Daniel Stuš
import data.DataLoader;
4 0cc85c2d Lukáš Ščurko
import data.JDFPevnykodRecord;
5
import org.apache.log4j.BasicConfigurator;
6
import org.apache.log4j.Level;
7
import org.apache.log4j.Logger;
8
import org.junit.BeforeClass;
9
import org.junit.Test;
10
11
import static org.junit.Assert.assertEquals;
12
/**************************
13
 Trida na testovani zpracovaní zaznamu ve tride JDFPevnykodRecord
14
 -issue #7447
15
 */
16
public class testJDFPevnykodRecord {
17
    static JDFPevnykodRecord pevnykodRecord;
18
    private static final Logger log = Logger.getLogger(testJDFCaskodyRecord.class);
19
    private static String[] testRecord;
20
21
    @BeforeClass
22
    public static void setUpBeforeClass() {
23
24
        BasicConfigurator.configure();
25
        Logger.getRootLogger().setLevel(Level.INFO);
26 27ba3ec6 Daniel Stuš
        testRecord = DataLoader.parseLine("\"1\",\"X\",\"\";");
27 0cc85c2d Lukáš Ščurko
    }
28
29
    /*****
30
     * testovací metoda, která zkontroluje spravnost zpracovani
31
     */
32
    @Test
33
    public void testProcessData(){
34
        pevnykodRecord = new JDFPevnykodRecord(testRecord);
35
        assertEquals(1,pevnykodRecord.getId());
36
        assertEquals(0,pevnykodRecord.getValue().compareToIgnoreCase("X"));
37
    }
38
}