예제 #1
0
        public void GenerateBarcode_WithCode39_ShouldReturnBase64String()
        {
            // Arrange
            const string codabarType = "code39";
            const string value = "A123*";

            // Act
            Barcode barcode = new Barcode();
            BarcodeObject calculated = barcode.GenerateBarcode(codabarType, value);

            // Assert
            Assert.That(calculated.ImageBytes.Length, Is.EqualTo(4307));
        }
예제 #2
0
        public void GenerateBarcode_WithEan8_ShouldReturnBase64String()
        {
            // Arrange
            const string codabarType = "ean8";
            const string value = "12435689";

            // Act
            Barcode barcode = new Barcode();
            BarcodeObject calculated = barcode.GenerateBarcode(codabarType, value);

            // Assert
            Assert.That(calculated.ImageBytes.Length, Is.EqualTo(5962));
        }