public void FormatDecimal(string input, string output, byte scale, int groupingSize, Padding padding, bool zerofill) { var value = Decimal.Parse(input); var expected = Encoding.ASCII.GetBytes(output); var buffer = new byte[expected.Length]; ByteHelper2.FormatDecimal(buffer, 0, buffer.Length, value, scale, groupingSize, padding, zerofill, (byte)' '); Assert.Equal(expected, buffer); }
public void FormatCustom28() { var buffer = new byte[28]; ByteHelper2.FormatDecimal(buffer, 0, buffer.Length, Value28, 3, -1, Padding.Left, false, 0x20); }
public void FormatCustom19() { var buffer = new byte[19]; ByteHelper2.FormatDecimal(buffer, 0, buffer.Length, Value19, 2, -1, Padding.Left, false, 0x20); }