public void ToZpl_Default1_Successful() { var command = new Interleaved2Of5BarCodeCommand(); var zplCommand = command.ToZpl(); Assert.AreEqual("^B2N,,Y,N,N", zplCommand); }
public void IsCommandParsable_InvalidCommand_False() { var command = new Interleaved2Of5BarCodeCommand(); var isParsable = command.IsCommandParsable("^FT10,10"); Assert.IsFalse(isParsable); }
public void IsCommandParsable_ValidCommand_True() { var command = new Interleaved2Of5BarCodeCommand(); var isParsable = command.IsCommandParsable("^B2N,,N,N,Y"); Assert.IsTrue(isParsable); }
public void ToZpl_Default4_Successful() { var command = new Interleaved2Of5BarCodeCommand(printInterpretationLine: false, printInterpretationLineAboveCode: false, calculateAndPrintMod10CheckDigit: true); var zplCommand = command.ToZpl(); Assert.AreEqual("^B2N,,N,N,Y", zplCommand); }
public void ToZpl_Default2_Successful() { var command = new Interleaved2Of5BarCodeCommand(Orientation.Rotated180); var zplCommand = command.ToZpl(); Assert.AreEqual("^B2I,,Y,N,N", zplCommand); }
public void ParseCommand_ValidCommand2_Successful() { var command = new Interleaved2Of5BarCodeCommand(); command.ParseCommand("^B2N,,Y,Y,Y"); Assert.AreEqual(Orientation.Normal, command.Orientation); Assert.IsNull(command.BarCodeHeight); Assert.IsTrue(command.PrintInterpretationLine); Assert.IsTrue(command.PrintInterpretationLineAboveCode); Assert.IsTrue(command.CalculateAndPrintMod10CheckDigit); }
public void ParseCommand_ValidCommand5_Successful() { var command = new Interleaved2Of5BarCodeCommand(); command.ParseCommand("^B2B,55"); Assert.AreEqual(Orientation.Rotated270, command.Orientation); Assert.AreEqual(55, command.BarCodeHeight); Assert.IsTrue(command.PrintInterpretationLine); Assert.IsFalse(command.PrintInterpretationLineAboveCode); Assert.IsFalse(command.CalculateAndPrintMod10CheckDigit); }