Beispiel #1
0
        public void ToZpl_Default1_Successful()
        {
            var command    = new Interleaved2Of5BarCodeCommand();
            var zplCommand = command.ToZpl();

            Assert.AreEqual("^B2N,,Y,N,N", zplCommand);
        }
Beispiel #2
0
        public void IsCommandParsable_InvalidCommand_False()
        {
            var command    = new Interleaved2Of5BarCodeCommand();
            var isParsable = command.IsCommandParsable("^FT10,10");

            Assert.IsFalse(isParsable);
        }
Beispiel #3
0
        public void IsCommandParsable_ValidCommand_True()
        {
            var command    = new Interleaved2Of5BarCodeCommand();
            var isParsable = command.IsCommandParsable("^B2N,,N,N,Y");

            Assert.IsTrue(isParsable);
        }
Beispiel #4
0
        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);
        }
Beispiel #5
0
        public void ToZpl_Default2_Successful()
        {
            var command    = new Interleaved2Of5BarCodeCommand(Orientation.Rotated180);
            var zplCommand = command.ToZpl();

            Assert.AreEqual("^B2I,,Y,N,N", zplCommand);
        }
Beispiel #6
0
        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);
        }
Beispiel #7
0
        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);
        }