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

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

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

            Assert.IsTrue(isParsable);
        }
Exemple #4
0
        public void ToZpl_Default4_Successful()
        {
            var command    = new Code128BarCodeCommand(printInterpretationLine: false, printInterpretationLineAboveCode: false, uccCheckDigit: true);
            var zplCommand = command.ToZpl();

            Assert.AreEqual("^BCN,,N,N,Y", zplCommand);
        }
Exemple #5
0
        public void ToZpl_Default2_Successful()
        {
            var command    = new Code128BarCodeCommand(Orientation.Rotated180);
            var zplCommand = command.ToZpl();

            Assert.AreEqual("^BCI,,Y,N,N", zplCommand);
        }
Exemple #6
0
        public void ParseCommand_ValidCommand2_Successful()
        {
            var command = new Code128BarCodeCommand();

            command.ParseCommand("^BCN,,Y,Y,Y");
            Assert.AreEqual(Orientation.Normal, command.Orientation);
            Assert.IsNull(command.BarCodeHeight);
            Assert.IsTrue(command.PrintInterpretationLine);
            Assert.IsTrue(command.PrintInterpretationLineAboveCode);
            Assert.IsTrue(command.UccCheckDigit);
        }
Exemple #7
0
        public void ParseCommand_ValidCommand5_Successful()
        {
            var command = new Code128BarCodeCommand();

            command.ParseCommand("^BCB,55");
            Assert.AreEqual(Orientation.Rotated270, command.Orientation);
            Assert.AreEqual(55, command.BarCodeHeight);
            Assert.IsTrue(command.PrintInterpretationLine);
            Assert.IsFalse(command.PrintInterpretationLineAboveCode);
            Assert.IsFalse(command.UccCheckDigit);
        }