public void SplitOnWordsSuceeds() { string barcode = "000000011111110001111"; string[] expected = new string[] { "0000000", "1111111", "0001111" }; Assert.AreEqual(expected, BarcodeProgram.SplitIntoWords(barcode)); }
public void SplitOnWordsThrowsOnBadLength() { string barcode = "101000000011111110001111101"; Assert.That( () => BarcodeProgram.SplitIntoWords(barcode), Throws.Exception.TypeOf <FormatException>()); }