コード例 #1
0
        public void ToZpl_Default1_Successful()
        {
            var command    = new QrCodeBarCodeCommand(Orientation.Normal, 2, 1, ErrorCorrectionLevel.HighReliability, 7);
            var zplCommand = command.ToZpl();

            Assert.AreEqual("^BQN,2,1,Q,7", zplCommand);
        }
コード例 #2
0
        public void IsCommandParsable_InvalidCommand_False()
        {
            var command    = new QrCodeBarCodeCommand();
            var isParsable = command.IsCommandParsable("^FT10,10");

            Assert.IsFalse(isParsable);
        }
コード例 #3
0
        public void IsCommandParsable_ValidCommand_True()
        {
            var command    = new QrCodeBarCodeCommand();
            var isParsable = command.IsCommandParsable("^BQN,2,1,Q,7");

            Assert.IsTrue(isParsable);
        }
コード例 #4
0
        public void ParseCommand_InvalidCommandSetDefaults_Successful()
        {
            var command = new QrCodeBarCodeCommand();

            command.ParseCommand("^BQX,1,2,X,1");
            Assert.AreEqual(Orientation.Normal, command.Orientation);
            Assert.AreEqual(1, command.Model);
            Assert.AreEqual(2, command.MagnificationFactor);
            Assert.AreEqual(ErrorCorrectionLevel.HighReliability, command.ErrorCorrection);
            Assert.AreEqual(1, command.MaskValue);
        }
コード例 #5
0
        public void ParseCommand_ValidCommand3_Successful()
        {
            var command = new QrCodeBarCodeCommand();

            command.ParseCommand("^BQN,1,2,M,1");
            Assert.AreEqual(Orientation.Normal, command.Orientation);
            Assert.AreEqual(1, command.Model);
            Assert.AreEqual(2, command.MagnificationFactor);
            Assert.AreEqual(ErrorCorrectionLevel.Standard, command.ErrorCorrection);
            Assert.AreEqual(1, command.MaskValue);
        }