public void ToInt32ReturnsExpectedValue() { var value = _fixture.Create <int>().AsRecordNumberValue(); var sut = new RecordNumber(value); var result = sut.ToInt32(); Assert.Equal(value, result); }
public void Write(BinaryWriter writer) { if (writer == null) { throw new ArgumentNullException(nameof(writer)); } writer.WriteInt32BigEndian(RecordNumber.ToInt32()); writer.WriteInt32BigEndian(ContentLength.ToInt32()); }
public int CompareTo(RecordNumber other) { return(_value.CompareTo(other.ToInt32())); }
public bool Equals(RecordNumber other) => _value.Equals(other.ToInt32());