Package it.stefanobertini.zebra.beans

Examples of it.stefanobertini.zebra.beans.Position


    }

    @Test(expected = ValidationException.class)
    public void testValidation() {

  Pdf417 command = new Pdf417(Orientation.horizontal, new Position(10, 20), 3, 12, 3, 2);

  CommandOutputBuilder output = new CommandOutputBuilder();
  output.printLn("");

  assertCommand(output, command);
View Full Code Here


public class ConcatTest {

    @Test
    public void test() {
  Concat command = new Concat(Orientation.horizontal, new Position(1, 2));
  command.addText(new Font("3", 4), 5, "First line");
  command.addText(new Font("7", 8), 9, "Second line");

  CommandOutputBuilder output = new CommandOutputBuilder();
  output.printLn("CONCAT 1 2");
View Full Code Here

public class LineTest {

    @Test
    public void testDefault() {
  Line command = new Line(new Position(1, 2), new Position(3, 4));

  CommandOutputBuilder output = new CommandOutputBuilder();
  output.printLn("LINE 1 2 3 4 1");

  assertCommand(output, command);
View Full Code Here

  assertCommand(output, command);
    }

    @Test
    public void test() {
  Line command = new Line(new Position(1, 2), new Position(3, 4), 5);

  CommandOutputBuilder output = new CommandOutputBuilder();
  output.printLn("LINE 1 2 3 4 5");

  assertCommand(output, command);
View Full Code Here

  assertArrayEquals(expected, data);
    }

    @Test
    public void testFromFile() throws Exception {
  Pcx command = new Pcx(new Position(1, 2));
  command.loadImageFromFile(new File("./target/test-classes/test.pcx"));

  byte[] data = command.getCommandByteArray();
  ByteArrayOutputStream expected = new ByteArrayOutputStream();
  expected.write("PCX 1 2\r\n".getBytes());
View Full Code Here

  assertArrayEquals(expected.toByteArray(), data);
    }

    @Test
    public void testFromResource() throws Exception {
  Pcx command = new Pcx(new Position(1, 2));
  command.loadImageFromResource("test.pcx");

  byte[] data = command.getCommandByteArray();
  ByteArrayOutputStream expected = new ByteArrayOutputStream();
  expected.write("PCX 1 2\r\n".getBytes());
View Full Code Here

  assertArrayEquals(expected.toByteArray(), data);
    }

    @Test(expected = ValidationException.class)
    public void testValidation() {
  Pcx command = new Pcx(new Position(1, 2));

  command.getCommandByteArray();
    }
View Full Code Here

public class MaxiCodeTest {

    @Test
    public void test1() {
  MaxiCode command = new MaxiCode(new Position(1, 2));
  command.addTag(MaxiCodeTag.countryCode, "12345");
  command.addTag(MaxiCodeTag.msg, "This is a MAXICODE low priority message.");
  command.addTag(MaxiCodeTag.serviceClass, "12345");
  command.addTag(MaxiCodeTag.postalCode, "02886");
View Full Code Here

  assertCommand(output, command);
    }

    @Test
    public void test2() {
  MaxiCode command = new MaxiCode(new Position(1, 2));
  command.addTag(MaxiCodeTag.countryCode, "12345");
  command.addTag(MaxiCodeTag.msg, "This is a MAXICODE low priority message.");
  command.addTag(MaxiCodeTag.serviceClass, "12345");
  command.addTag(MaxiCodeTag.postalCode, "02886");
  command.addTag(MaxiCodeTag.zipper, "1");
View Full Code Here

  font.toString();
    }

    @Test
    public void testPosition() {
  Position position = new Position();
  position.toString();
    }
View Full Code Here

TOP

Related Classes of it.stefanobertini.zebra.beans.Position

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.