public void ToByteStringTest() { var baseNString = "6Q======"; var expected = new byte[] { 244 }; var actual = Base32Convert.ToBytes(baseNString); Assert.Equal(expected, actual); }
public void ToBytesByteArrayPartialTest() { var baseNCharBytes = "996Q======99".ToCharArray().Select(ch => (byte)ch).ToArray(); var expected = new byte[] { 244 }; var actual = Base32Convert.ToBytes(baseNCharBytes, 2, baseNCharBytes.Length - 4); Assert.Equal(expected, actual); }
public void ToBytesByteArrayTest() { var baseNCharBytes = "6Q======".ToCharArray().Select(ch => (byte)ch).ToArray(); var expected = new byte[] { 244 }; var actual = Base32Convert.ToBytes(baseNCharBytes); Assert.Equal(expected, actual); }
public void ToBytesCharArrayPartialTest() { var baseNChars = "996Q======99".ToCharArray(); var expected = new byte[] { 244 }; var actual = Base32Convert.ToBytes(baseNChars, 2, baseNChars.Length - 4); Assert.Equal(expected, actual); }
public void ToBytesCharArrayTest() { var baseNChars = "6Q======".ToCharArray(); var expected = new byte[] { 244 }; var actual = Base32Convert.ToBytes(baseNChars); Assert.Equal(expected, actual); }
public void ToBytesStringPartialTest() { var baseNString = "996Q======99"; var expected = new byte[] { 244 }; var actual = Base32Convert.ToBytes(baseNString, 2, baseNString.Length - 4); Assert.Equal(expected, actual); }