public void CanConvertFromByteToAscii(IByte inputByte, string expectedChar) { var result = new ByteToAsciiConverter(new ByteToBase10Converter( new ByteFactory(new Base10Converter()), new Base10Converter())).ToAscii(inputByte); Assert.AreEqual(expectedChar, result); }
public void CanConvertFromAsciiToByte(IByte outputByte, string inputChar) { var result = new ByteToAsciiConverter(new ByteToBase10Converter(new ByteFactory(new Base10Converter()), new Base10Converter())) .ToByte(inputChar); for (var i = 0; i < outputByte.Count; i++) { Assert.AreEqual(outputByte[i], result[i]); } }