Ejemplo n.º 1
0
        public void ToBinaryStringNoNewline()
        {
            string s        = "▍  ▍ \n";
            string expected = "10010";

            Assert.AreEqual(expected, BarcodeProgram.ToBinaryString(s));
        }
Ejemplo n.º 2
0
        public void ToBinaryStringTestdata()
        {
            string s        = "▍ ▍   ▍▍ ▍ ▍▍   ▍  ▍▍  ▍   ▍▍ ▍   ▍▍ ▍   ▍▍ ▍ ▍ ▍ ▍▍▍  ▍ ▍▍  ▍▍ ▍▍ ▍▍  ▍  ▍▍▍ ▍▍  ▍▍ ▍   ▍  ▍ ▍";
            string expected = "10100011010110001001100100011010001101000110101010111001011001101101100100111011001101000100101";

            Assert.AreEqual(expected, BarcodeProgram.ToBinaryString(s));
        }
Ejemplo n.º 3
0
        public void ToBinaryStringSimple()
        {
            string s        = "▍  ▍ ";
            string expected = "10010";

            Assert.AreEqual(BarcodeProgram.ToBinaryString(s), expected);
        }