public void GetValue_ForBinary8_WithEmptyBytes_ReturnsExpectedValue() { var info = ValueInfo.ForContent(1, 0); var actual = Format.GetValue(Binary8FormatByte, info, TestBytes); Assert.That(actual, Is.EqualTo(TestBytes)); }
public void GetValue_ForBinary32_ReturnsExpectedValue() { var info = ValueInfo.ForContent(4, TestBytes.Length); var actual = Format.GetValue(Binary32FormatByte, info, TestBytes); Assert.That(actual, Is.EqualTo(TestBytes)); }
private ValueInfo GetValueInfo(Stream stream, int headerSize) { var bytes = NumericParser.ReadInt32(stream, headerSize); return(ValueInfo.ForContent(headerSize, bytes)); }