Package it.stefanobertini.zebra.cpcl.utility

Source Code of it.stefanobertini.zebra.cpcl.utility.CountryTest

package it.stefanobertini.zebra.cpcl.utility;

import static it.stefanobertini.zebra.CommandAssert.assertCommand;
import it.stefanobertini.zebra.CommandOutputBuilder;
import it.stefanobertini.zebra.cpcl.utility.Country;
import it.stefanobertini.zebra.enums.CountryCode;

import org.junit.Test;

public class CountryTest {

    @Test
    public void testString() {
  Country command = new Country("USA");

  CommandOutputBuilder output = new CommandOutputBuilder();
  output.printLn("! UTILITIES");
  output.printLn("COUNTRY USA");
  output.printLn("PRINT");

  assertCommand(output, command);
    }

    @Test
    public void testEnum() {
  Country command = new Country(CountryCode.usa);

  CommandOutputBuilder output = new CommandOutputBuilder();
  output.printLn("! UTILITIES");
  output.printLn("COUNTRY USA");
  output.printLn("PRINT");

  assertCommand(output, command);
    }

    @Test
    public void testDefault() {
  Country command = new Country();

  CommandOutputBuilder output = new CommandOutputBuilder();
  output.printLn("! UTILITIES");
  output.printLn("COUNTRY USA");
  output.printLn("PRINT");

  assertCommand(output, command);
    }

    @Test
    public void testFake() {
  Country command = new Country();
  command.setCountryCode(CountryCode.big5);
  command.setCountryCode("");
  command.getCountryCode();
  command.toString();
    }
}
TOP

Related Classes of it.stefanobertini.zebra.cpcl.utility.CountryTest

TOP
Copyright © 2018 www.massapi.com. 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.