public void ToBase32String(string input, string expected) { byte[] bytes = Encoding.ASCII.GetBytes(input); string actual = Base32Converter.ToBase32String(bytes); Assert.Equal(expected, actual); }
public void Base32RoundTrip() { var input = new byte[4096]; new Random().NextBytes(input); var base32 = Base32Converter.ToBase32String(input); var output = Base32Converter.FromBase32String(base32); Assert.Equal(input, output); }
public void ToBase32String_Null_ShouldThrow() { Assert.Throws <ArgumentNullException>(() => Base32Converter.ToBase32String(null)); }