Package it.stefanobertini.zebra.cpcl.config

Source Code of it.stefanobertini.zebra.cpcl.config.SetVarTest

package it.stefanobertini.zebra.cpcl.config;

import static it.stefanobertini.zebra.CommandAssert.assertCommand;
import it.stefanobertini.zebra.CommandOutputBuilder;
import it.stefanobertini.zebra.cpcl.config.SetVar;
import it.stefanobertini.zebra.enums.ConfigurationKey;

import org.junit.Test;

public class SetVarTest {

    @Test
    public void test() {
  SetVar command = new SetVar(ConfigurationKey.commBaud, "9600");

  CommandOutputBuilder output = new CommandOutputBuilder();
  output.printLn("! U1 setvar \"comm.baud\" \"9600\"");

  assertCommand(output, command);
    }

    @Test(expected = RuntimeException.class)
    public void testBadKey() {
  new SetVar(ConfigurationKey.deviceReset, "");
    }

    @Test(expected = RuntimeException.class)
    public void testNullKey() {
  new SetVar(null, "");
    }

    @Test
    public void testToSting() {
  new SetVar(ConfigurationKey.commBaud, "9600").toString();
    }
}
TOP

Related Classes of it.stefanobertini.zebra.cpcl.config.SetVarTest

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.