예제 #1
0
        public void SplitOnWordsSuceeds()
        {
            string barcode = "000000011111110001111";

            string[] expected = new string[] { "0000000", "1111111", "0001111" };
            Assert.AreEqual(expected, BarcodeProgram.SplitIntoWords(barcode));
        }
예제 #2
0
        public void SplitOnWordsThrowsOnBadLength()
        {
            string barcode = "101000000011111110001111101";

            Assert.That(
                () => BarcodeProgram.SplitIntoWords(barcode),
                Throws.Exception.TypeOf <FormatException>());
        }