package hu.astrid.debgen.labelprint.domain;

import org.junit.Test;
import static org.junit.Assert.assertEquals;

/**
 * Astrid Research
 * Author: inagy
 * Created: Jan 11, 2010 3:55:33 PM
 */
public class PatientLabelTest {
     /**
     * Tests whether if processed template equals String manually created or not.
     */
    @Test
    public void testProcessTemplate() throws Exception {
        Label label = new PatientLabel();
        label.setCodeValue("DGBR10");
        String result = label.processTemplate();
        assertEquals(
                "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2^MD0^JUS^LRN^CI0^XZ\r\n" +
                "^XA\r\n" +
                "^MMT\r\n" +
                "^LL0118\r\n" +
                "^LS0\r\n" +
                "^BY2,3,59^FT94,71^BAN,,N,N\r\n" +
                "^FDDGBR10^FS\r\n" +
                "^FT130,108^A0N,37,36^FH\\^FDDGBR10^FS\r\n" +
                "^FO24,13^GB63,94,94^FS\r\n" +
                "^FT24,88^A0N,75,112^FR^FH\\^FDP^FS\r\n" +
                "^PQ1,0,1,Y^XZ\r\n", result);

    }
}
